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

Remove buildAuthorizeUrl #980

Merged
merged 2 commits into from
Sep 12, 2022
Merged

Remove buildAuthorizeUrl #980

merged 2 commits into from
Sep 12, 2022

Conversation

frederikprijck
Copy link
Member

@frederikprijck frederikprijck commented Sep 12, 2022

Changes

This PR removes buildAuthorizeUrl. This method was introduced to allow external redirect when logging in, this has now been supported through using onRedirect when calling loginWithRedirect.

Any code that uses to rely on buildAuthorizeUrl:

const url = await client.buildAuthorizeUrl();
// pass url to anything that opens the url

Should be updated to use onRedirect():

await client.loginWithRedirect({
  async onRedirect(url) {
    // pass url to anything that opens the url
  }
})

With the removal of the fact that calling buildAuthorizeUrl created a transaction, this method is now less useful as it can not be used to start the login flow, because of the fact that the SDK will not be able to handle the callback due to missing transaction. Therefor, removing it makes sense as it was initially introduced for the reasons covered in the alternative (using onRedirect).

Checklist

@frederikprijck frederikprijck requested a review from a team as a code owner September 12, 2022 13:51
ewanharris
ewanharris previously approved these changes Sep 12, 2022
@frederikprijck frederikprijck changed the title Change buildAuthorizeUrlOptions to not accept appState and onRedirect Remove buildAuthorizeUrl Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants