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

Redirect URI for every route? #8

Open
andreasciamanna opened this issue Mar 8, 2021 · 3 comments
Open

Redirect URI for every route? #8

andreasciamanna opened this issue Mar 8, 2021 · 3 comments

Comments

@andreasciamanna
Copy link

I'm trying to use this component to authenticate into GitLab.

In GitLab, I must define the redirect URI for the given application. I can define multiple URIs.

The Redirect URI is the URL where users are sent after they authorize with GitLab.

When using this component, the redirect URI is changed to the current route/url.

This forces me to add ever rout of the app in GitLab.

In other words, if I have route myapp.tld/A and myapp.tld/B and both need to access some API in GitLab, I need to define both URLs when creating the oAuth application in GitLab.

It would be perfectly fine to redirect the user to the app's home after getting the authorization from GitLab.

This makes little sense to me.

I'm sure I'm missing something obvious here.

@Chris927
Copy link
Contributor

Chris927 commented Mar 8, 2021

Hi Andrea

Have you tried to only specify myapp.tld/ as redirect URI, i.e. without A or B? This is how we used react-pkce with other oauth2 providers: They then allowed any URI as redirect URI that begins with myapp.tld/,

@andreasciamanna
Copy link
Author

Yes, I've tried both myapp.tld/ and myapp.tld/* but it's clearly not possible to do so.

It would help a lot if I could just pass a redirectUri property to createAuthContext.

@fstoerkle
Copy link

@Chris927 we face the same problem, our Oauth provider allows only a very specific Redirect URI (/auth/foo/callback).

This is a blocker for us, unfortunately we cannot use this library without the ability to specify the redirect uri.
There seems to be a PR already for adding this: #7

Would you consider merging that?

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

No branches or pull requests

3 participants