Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User Migration set as PHP constant causes token to not be generated #620

Closed
toddheslin opened this issue Jan 14, 2019 · 4 comments
Closed
Milestone

Comments

@toddheslin
Copy link

Hey @joshcanhelp this is just a note to either consider a fix or an update to the docs. The migration_ws variable, when set as a ENV such as:

define( 'AUTH0_ENV_MIGRATION_WS',  true );

Will mean that when you load the plugin in a new environment, it will not generate a webservice token. The only way to do it is:

  1. Disable this constant
  2. Switch the option on manually
  3. Get the token
  4. Set both variables back in the configuration, such as
define( 'AUTH0_ENV_MIGRATION_WS',  true );
define( 'AUTH0_ENV_MIGRATION_TOKEN',  'the-generated-token' );

This was a few hours messing around but I hope it helps someone who comes across the same situation. Not sure if it's worth a code update or just a note in the docs.

👍

@joshcanhelp
Copy link
Contributor

@toddheslin - Thanks for the note here. As of the current version (3.9.0, released 1/11), you can save the settings page with AUTH0_ENV_MIGRATION_WS set to true and one will generate. You can also generate your own and use that in the AUTH0_ENV_MIGRATION_TOKEN constant. The problem is that the token is generated when the settings are saved, not when the page is loaded.

That said, I think that the scenario you're describing here, endpoints on but no token, is something the setting UI could do a better job with (even just a prompt to save the page) so I'll add a task for that on our end for the next release.

@toddheslin
Copy link
Author

Thanks Josh. I implemented this the day before the release came out haha

@joshcanhelp
Copy link
Contributor

Sorry for the poor timing!

@toddheslin
Copy link
Author

Not at all, thanks for the great work! 💯

@joshcanhelp joshcanhelp added this to the 3.10.0 milestone Apr 10, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants