-
Notifications
You must be signed in to change notification settings - Fork 694
code in readme.md cause cyclical redirct #639
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
Comments
The
So if you always call that method at the start of your application, then you'd indeed keep getting sent back to the IDS. I've not found much use for that specific method. I guess you could do this: // check if you got redirected and an access token was passed along first:
this.oauthService.tryLogin().then(() => {
if (this.oauthService.hasValidAccessToken()) {
this.oauthService.loadDiscoveryDocument();
} else {
this.oauthService.loadDiscoveryDocumentAndLogin();
}
}); But I tend to do things more explicitly, along these lines: |
when use openid for a server side app, normally the server side app has a callback path for handle openid signin, and another path for handle signout , and those two path will redirect to the path belong to the app, for example this is how openid work in an asp.net core app: note:
so I think the best match to the asp.net core, is |
I'm not sure what you're exactly asking or telling us? If you need more help, or think you've found a bug, could you please provide a way to reproduce? (Specifically, I'm unclear why you compare with server side apps, this lib is primarily used in Single Page Applications. What flow are you using, implicit ir code?) |
The reason I compare with service side app (asp.net core ) is because in asp.net core it difine a very easy to use and flexiable way to use the OIDC protocal , I'm hoping that can be implement in this library too. I'll contribute to this library when I get free time. |
I noticed that it'll send a request to the identity server and redirect back to the app with a hash param of the id tokens but looks like it never gets registered/loaded/consume before it hits the bootstrapped component. Is there something missing here? |
I've not found the I recommend being explicit, not using one of the |
@jeroenheijmans is right. I think what threw us off was the method name " But all it did was to check if the request had the correct hash fragments to obtain the access key. Steps we took that works:
|
Good to hear you've found a solution. Shall we close this one then? Or will you suggest a PR with a change to readme to clarify things further? Either's good to me. |
Would love to put a PR in. And get that for hacktoberfest heh
…On Tue, 8 Oct 2019, 12:38 am Jeroen Heijmans, ***@***.***> wrote:
Good to hear you've found a solution. Shall we close this one then? Or
will you suggest a PR with a change to readme to clarify things further?
Either's good to me.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#639?email_source=notifications&email_token=ACS4BBS7GNQMJESAR4Y3ON3QNNCWHA5CNFSM4I3C6BR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAQSPOA#issuecomment-539043768>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACS4BBVF2K7VIMGSVAQCT2TQNNCWHANCNFSM4I3C6BRQ>
.
|
after use
this.oauthService.loadDiscoveryDocumentAndLogin()
, the app into an infinity redirct circulationThe text was updated successfully, but these errors were encountered: