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

Add a new property 'fragment' to be appended to the authorize URL on redirect #249

Merged
merged 2 commits into from
Oct 31, 2019

Conversation

willhackett
Copy link
Contributor

@willhackett willhackett commented Oct 21, 2019

Description

In some circumstances the URL may need to be mutated post-generation. An example use case is adding parameters to the hash (#) part of the URL in order to more safely transmit personally identifiable information.

I've added a new public method to return the URL instead of merely redirecting.

Potential use:

const url = await auth0.buildLoginUrl();
window.location.assign(`${url}#hint=user@auth0.com`);

References

Testing

Call the buildLoginUrl method available on Auth0Client.

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not master

willhackett added a commit to willhackett/docs that referenced this pull request Oct 24, 2019
joshcanhelp
joshcanhelp previously approved these changes Oct 25, 2019
Copy link
Contributor

@joshcanhelp joshcanhelp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@willhackett - Appreciate the contribution here and in Docs!

This looks good to me but I'm going to leave this for the platform maintainers to make sure this public API addition makes sense to them.

@joshcanhelp joshcanhelp added small CH: Added PR is adding feature or functionality and removed small labels Oct 25, 2019
@willhackett willhackett requested a review from a team October 27, 2019 23:44
@joshcanhelp joshcanhelp removed the request for review from a team October 28, 2019 17:18
@willhackett
Copy link
Contributor Author

@luisrudge if preferred, this is also an option:
88ac957

@stevehobbsdev
Copy link
Contributor

Hey @willhackett, appreciate your patience with this. We'd like to go for option 2 (88ac957). Would you be able to rework the PR (or feel free to raise a new one) with that?

Thanks for the contribution!

@stevehobbsdev stevehobbsdev changed the title Add buildLoginUrl public method and update loginWithRedirect Add a new property 'fragment' to be appended to the authorize URL on redirect Oct 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CH: Added PR is adding feature or functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants