Skip to content

Commit

Permalink
Improve the setup wizard.
Browse files Browse the repository at this point in the history
  • Loading branch information
wparad committed Jun 17, 2024
1 parent f717654 commit 2f80401
Show file tree
Hide file tree
Showing 17 changed files with 111 additions and 77 deletions.
19 changes: 2 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,7 @@ The SSO Login plugin for Wordpress - adds SSO html template and login buttons
### Customizing the SSO Login plugin
[See customizations](./docs/customizations.md)

### Development

```sh
sudo apt install php-xmlwriter
composer install --no-progress --prefer-dist --optimize-autoloader
```
### Contributing to the Authress Plugin

* [Using Subversion with the WordPress Plugin Directory](https://developer.wordpress.org/plugins/wordpress-org/how-to-use-subversion/)
* [FAQ about the WordPress Plugin Directory](https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/)
* [WordPress Plugin Directory readme.txt standard](https://wordpress.org/plugins/developers/#readme)
* [A readme.txt validator](https://wordpress.org/plugins/developers/readme-validator/)
* [Plugin Assets (header images, etc)](https://developer.wordpress.org/plugins/wordpress-org/plugin-assets/)
* [WordPress Plugin Directory Guidelines](https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/)
* [Block Specific Plugin Guidelines](https://developer.wordpress.org/plugins/wordpress-org/block-specific-plugin-guidelines/)

### Testing
To test login, navigate to `http://localhost:8080/wp-login.php`
* The default login credentials as `admin` - `admin`
Likewise the admin menu is at: `http://localhost:8080/wp-admin.php`
See [Contributing to the Authress WordPress SSO Login Plugin](./contributing.md)
34 changes: 34 additions & 0 deletions contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

### Development

1. Install Docker
[Install Docker](https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository)
```sh
sudo snap install docker
```

2. install PHP
```sh
sudo apt install php-xmlwriter php-cli php-curl php-mbstring docker-compose-plugin
./composer.phar install --prefer-dist --optimize-autoloader
```


* [Using Subversion with the WordPress Plugin Directory](https://developer.wordpress.org/plugins/wordpress-org/how-to-use-subversion/)
* [FAQ about the WordPress Plugin Directory](https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/)
* [WordPress Plugin Directory readme.txt standard](https://wordpress.org/plugins/developers/#readme)
* [A readme.txt validator](https://wordpress.org/plugins/developers/readme-validator/)
* [Plugin Assets (header images, etc)](https://developer.wordpress.org/plugins/wordpress-org/plugin-assets/)
* [WordPress Plugin Directory Guidelines](https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/)
* [Block Specific Plugin Guidelines](https://developer.wordpress.org/plugins/wordpress-org/block-specific-plugin-guidelines/)

### Running the plugin
* `yarn build`
* `yarn start`
* Login and go to the Plugins page and click `Activate` on the Authress settings screen.


### Testing
To test login, navigate to `http://localhost:8080/wp-login.php`
* The default login credentials as `admin` - `admin`
Likewise the admin menu is at: `http://localhost:8080/wp-admin.php`
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"install": "./composer.phar install --prefer-dist --optimize-autoloader",
"build": "./composer.phar install --prefer-dist --optimize-autoloader",
"copy-libs": "cp node_modules/authress-login/dist/authress.min.js templates/assets/js/authress-login-sdk.min.js",
"copy-libs": "cp node_modules/@authress/login/dist/authress.min.js templates/assets/js/authress-login-sdk.min.js",
"start": "sudo docker-compose up",
"lint": "./vendor/bin/phpcs -i && ./vendor/bin/phpcs -s .",
"kill": "sudo docker-compose rm --stop --force",
Expand All @@ -16,10 +16,10 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"authress-login": "^1.2.101"
"@authress/login": "^2.5"
},
"devDependencies": {
"authress-sdk": "^1",
"@authress/sdk": "^2.3.6",
"base64url": "^3.0.1",
"body-parser": "^1.19.0",
"express": "^4.17.1",
Expand Down
4 changes: 2 additions & 2 deletions templates/assets/js/authress-login-sdk.min.js

Large diffs are not rendered by default.

36 changes: 17 additions & 19 deletions templates/initial-setup/setup-wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,34 @@
<h1><?php esc_attr_e( 'Authress Setup Wizard', 'wp-authress' ); ?></h1>
<?php if ( authress_plugin_has_been_fully_configured() ) : ?>
<h3>Your integration has successfully completed!

<h3>Important: How to return to this page later</h3>
<p>Navigate to <a href="/wp-login.php?wle=true">/wp-login.php?wle=true</a> at any time to use the WordPress login.</p>

<hr>

<p>
<h3>Next steps:</h3>
<ul>
<li>Your users can now sign in with their configured SSO provider. When prompted they can enter their SSO identity and log in.</li>
<ol>
<li>Your users can now sign in with their configured SSO provider.</li>
<li>For your customer's admin they should be directed to configure their SSO.</li>
</ul>
</ol>
</p>

<h3><?php esc_attr_e( 'Automated Setup', 'wp-authress' ); ?></h3>
<p>Or try out the SSO Login default configuration:</p>

<p><?php esc_attr_e( 'The next step is to configure an SSO Connection', 'wp-authress' ); ?></p>
<p><?php esc_attr_e( "Every business will configure their own connection with their SSO provider and enable it in Authress. However, to test out the SSO Login, it is recommended you configure a test one for your WordPress administrators.", 'wp-authress' ); ?>)</p>
<p>Fill in all the connection details with values for an SSO provider. We recommend Google Workspace as an initial test. Make sure to set the <strong>Audience Identifier</strong> property of the Authress connection to be <strong>wordpress-admin</strong>.</p>
<p><?php esc_attr_e( "Then navigate to the SSO Login prompt and enter that same value.", 'wp-authress' ); ?></p>
<a href="/wp-login.php?force=true"><button class="button button-primary">Try the SSO login</button></a>

<a href="https://authress.io/app/#/setup?focus=connections" target="_blank"><button class="button button-primary">Create an SSO Connection</button></a>
<h3><?php esc_attr_e( 'Configure your login page', 'wp-authress' ); ?></h3>

<br><br>
<p>Finish that step or want to se the SSO login page?
<br>
<small>(Note: You won't be able to actually log in until you configure a tenant identity provider above.)</small>
</p>

<a href="/wp-login.php?action=logout"><button class="button button-primary">Try the SSO login</button></a>
<p>The Authress managed login box is option to use. This page can be configured using the Authress Log in branding configuration screen. Or you can set up and configure your own by interacting with the Authress login SDK.</p>
<a href="https://authress.io/app/#/setup?focus=branding" target="_blank"><button class="button button-primary">Style the login box</button></a>

<hr>

<form action="options.php" method="POST">
<input type="hidden" name="action" value="authress_sso_login_callback_step1" />
<h3><?php esc_attr_e( 'Automated Setup', 'wp-authress' ); ?></h3>
<h3><?php esc_attr_e( 'Rerun Automated Setup', 'wp-authress' ); ?></h3>

<p>
<?php esc_attr_e( 'If you are running into issues, you can always rerun the automated setup.', 'wp-authress' ); ?>
Expand Down Expand Up @@ -60,8 +58,8 @@

<hr>

<p><?php esc_attr_e( 'For more information on installation and configuration, please see the', 'wp-authress' );
printf(' <strong><a href="https://authress.io/knowledge-base" target="_blank">%s</a></strong>', esc_attr_e( 'Authress Knowledge Base', 'wp-authress' )); ?>.</p>
<p><?php esc_attr_e( 'For more information on installation and configuration, please see the ', 'wp-authress' ); ?>
<a href="https://authress.io/knowledge-base" target="_blank"><?php esc_attr_e( 'Authress Knowledge Base', 'wp-authress' ); ?></a>.</p>

<p><?php esc_attr_e( 'For additional support at any time, reach out to', 'wp-authress' ); ?>
<a href="https://authress.io/app/#/support" target="_blank"><?php esc_attr_e( 'Authress support', 'wp-authress' ); ?></a>.</p>
Expand Down
Binary file removed wordpress/banner-1544x500.jpg
Binary file not shown.
Binary file added wordpress/banner-1544x500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed wordpress/banner-772x250.jpg
Binary file not shown.
Binary file added wordpress/banner-772x250.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified wordpress/icon-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified wordpress/icon-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 16 additions & 12 deletions wordpress/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion wordpress/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ This plugin requires an [Authress account](https://authress.io).

1. [Sign up here](https://authress.io/app/#/signup).
2. Follow the installation instructions the WordPress plugin during installation.
3. Navigate to the `Plugins` WordPress menu tab, select `Authress` and click `Activate`.

== Technical Notes ==
By using this plugin you are delegating the site authentication and profile handling to Authress. That means that you won't need to use the WordPress database to authenticate users and the default WordPress login forms will be upgraded to support the new SSO Login flow.
Expand Down Expand Up @@ -79,7 +80,9 @@ No problem, you can directly connect with the Authress development team in our [

== Screenshots ==

1. Enable your users to login with their email for any domain.
1. Authress managed login page.
2. Enable your users to login with their email for any domain.
3. Support security keys for Passkeys and MFA.

== How to customize this plugin ==

Expand Down
Binary file modified wordpress/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wordpress/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wordpress/screenshot-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 33 additions & 23 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@
# yarn lockfile v1


"@authress/login@*", "@authress/login@^2.5":
version "2.5.321"
resolved "https://registry.yarnpkg.com/@authress/login/-/login-2.5.321.tgz#cc5280cad9decbd14a562fe6362aa44d25807352"
integrity sha512-QqhowmL91XLQ/Gqh+Z3jnE5amTMtYDs+kdZ5CwCXCt+ok/eR0//GHap6zdnU7vWpsTVfZzniQO7pSASFztI7hA==
dependencies:
cookie "^0.5.0"
lodash.take "^4.1.1"

"@authress/sdk@^2.3.6":
version "2.3.136"
resolved "https://registry.yarnpkg.com/@authress/sdk/-/sdk-2.3.136.tgz#a4e44081d7add18562e5e1ef21d2199c0947a339"
integrity sha512-M2H0/h+PnobVN8XF2uTjdcfVy/OxDCI6jLd434h07c2v3seXaW4vg3NFmQSYHrLsA8RupB6WoPdQtPk8age7HA==
dependencies:
"@authress/login" "*"
axios "^0.21"
base64url "^3.0.1"
jose "^4.8.3"

"@sindresorhus/is@^0.14.0":
version "0.14.0"
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea"
Expand Down Expand Up @@ -59,24 +77,6 @@ [email protected]:
resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2"
integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=

authress-login@^1.2.101:
version "1.2.101"
resolved "https://registry.yarnpkg.com/authress-login/-/authress-login-1.2.101.tgz#4d99c2d1677915577e83eea7b99b2af108e7e89b"
integrity sha512-IYG7P1idqTAVGtd7x0oQnDXJKSU4vhVaEI9GZXwzymaJTEmoKlzXPp5D+Icoxn4Q7QxJuXaghdLluR+O5L1dRg==
dependencies:
axios "^0.21"
base64url "^3.0.1"
cookie "^0.4.1"

authress-sdk@^1:
version "1.2.17"
resolved "https://registry.yarnpkg.com/authress-sdk/-/authress-sdk-1.2.17.tgz#19ccb1a4f7f7fdb50aa51737f081d29c20feef12"
integrity sha512-1CNNKIHekwwd9p8I/p11NLXqBNffYE84UKTD1vdTuPx53Lkku5kMmvk11A8/gbAOSAMWWs55BJfIgC4TlGZRPg==
dependencies:
axios "^0.21"
base64url "^3.0.1"
jose "^3.6.2"

axios@^0.21:
version "0.21.4"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575"
Expand Down Expand Up @@ -260,11 +260,16 @@ [email protected]:
resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c"
integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw=

[email protected], cookie@^0.4.1:
[email protected]:
version "0.4.2"
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432"
integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==

cookie@^0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==

crypto-random-string@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5"
Expand Down Expand Up @@ -638,10 +643,10 @@ is-yarn-global@^0.3.0:
resolved "https://registry.yarnpkg.com/is-yarn-global/-/is-yarn-global-0.3.0.tgz#d502d3382590ea3004893746754c89139973e232"
integrity sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==

jose@^3.6.2:
version "3.20.3"
resolved "https://registry.yarnpkg.com/jose/-/jose-3.20.3.tgz#a074f684b07e49b35c075d97561883e3c637abf2"
integrity sha512-Z4a5Nl4pmGivdSgaq+a5EbNjrvSO4vtBTmVy5C3HNxWfJ92aG8DTNZrQywowxyOlSqdX/BmCPAy/ieElXDM3pw==
jose@^4.8.3:
version "4.15.5"
resolved "https://registry.yarnpkg.com/jose/-/jose-4.15.5.tgz#6475d0f467ecd3c630a1b5dadd2735a7288df706"
integrity sha512-jc7BFxgKPKi94uOvEmzlSWFFe2+vASyXaKUpdQKatWAESU2MWjDfFf0fdfc83CDKcA5QecabZeNLyfhe3yKNkg==

[email protected]:
version "3.0.0"
Expand All @@ -667,6 +672,11 @@ latest-version@^5.1.0:
dependencies:
package-json "^6.3.0"

lodash.take@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/lodash.take/-/lodash.take-4.1.1.tgz#0b4146dcb7a70c6153495187fc10b12b71fefadf"
integrity sha512-3T118EQjnhr9c0aBKCCMhQn0OBwRMz/O2WaRU6VH0TSKoMCmFtUpr0iUp+eWKODEiRXtYOK7R7SiBneKHdk7og==

lodash@^4.17.21:
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
Expand Down

0 comments on commit 2f80401

Please sign in to comment.