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

Use custom domain for Auth0 API if present #840

Closed
edmundcwm opened this issue Dec 10, 2021 · 2 comments
Closed

Use custom domain for Auth0 API if present #840

edmundcwm opened this issue Dec 10, 2021 · 2 comments
Assignees

Comments

@edmundcwm
Copy link

edmundcwm commented Dec 10, 2021

Describe the problem you'd like to have solved

Currently the WP_Auth0_Api_Abstract class sets the $domain property to the domain field in the settings page by using $this->options->get( 'domain' );.

If we want to use a custom domain, we'd need to use $this->options->get_auth_domain() as the 2nd parameter when instantiating an instance of the abstract class i.e., new WP_Auth0_Api_Refresh_Access_Token( $auth0_options, $auth0_options->get_auth_domain() );

In the abstract class, can we set this->domain to $this->options->get_auth_domain() instead? This will enable the use of a custom domain if one exists and fallback to the main domain if there isn't any.

Describe the ideal solution

In the WP_Auth0_Api_Abstract class, set this->domain to $this->options->get_auth_domain() which allows the use of custom domain if it exists or fallback to using the main domain.

@evansims evansims self-assigned this Dec 10, 2021
@evansims
Copy link
Member

evansims commented Dec 13, 2021

Hi @edmundcwm, thanks for your request! Let me investigate this and get back with you

@evansims
Copy link
Member

evansims commented Feb 10, 2022

Hey again @edmundcwm! Sorry for the delay 👋 Thanks for your suggestion, and I entirely agree this is how this should be getting handled automatically by the class. Unfortunately, we can't introduce this change as a simple merge as it would be considered a breaking change on the behavior, but I've backlogged this for us to implement in the next major update to the library.

P.S. Although I'm closing your ticket, I assure you were are not dismissing the suggestion; we just have a policy of not leaving feature request tickets open once they are backlogged internally.

Note to self/team: for our internal tracking, this is logged as SDK-3113.

@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