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

Mark redirect_uri optional on RedirectLoginOptions #53

Merged
merged 1 commit into from
Jul 9, 2019
Merged

Mark redirect_uri optional on RedirectLoginOptions #53

merged 1 commit into from
Jul 9, 2019

Conversation

frederikprijck
Copy link
Member

@frederikprijck frederikprijck commented Jul 7, 2019

Description

When configuring a global redirect_uri (by passing it as a property on Auth0ClientOptions to the Auth0Client constructor), passing a redirect uri is not required when calling loginWithRedirect (I think it will even be ignored if you do so: https://github.com/auth0/auth0-spa-js/blob/master/src/Auth0Client.ts#L67).

However, the typings have marked redirect_uri as required for RedirectLoginOptions.

This PR ensures the property is marked optional.

Testing

The samples from the Angular quickstart guide don't compile for me, for example the AuthGuard has this code:

client.loginWithRedirect({
  appState: { target: state.url }
});

Which gives me the following TSC error:
image

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

@frederikprijck frederikprijck requested a review from a team July 7, 2019 18:17
@luisrudge luisrudge merged commit a42a883 into auth0:master Jul 9, 2019
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