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

How to get return value using 3rd party login? #553

Closed
ghost opened this issue May 8, 2019 · 4 comments
Closed

How to get return value using 3rd party login? #553

ghost opened this issue May 8, 2019 · 4 comments
Labels
question For tagging support requests and general questions.

Comments

@ghost
Copy link

ghost commented May 8, 2019

I use 3rd Party Login.

The format of the access token issuance request is as follows.

https://nid.naver.com/oauth2.0/token?client_id={client_id}&client_secret={client_secret&grant_type=authorization_code&state={state}&code={code}

If the access token request succeeds, it returns a JSON-formatted value.

It has a different value from AuthConfig provided by angular-oauth2-oidc, so I putted all the required values ​​in loginUrl.

스크린샷 2019-05-08 오후 1 43 27

If I logged in, go to the loginurl and the resulting value appeared in browser.

What I want is to get a return value.

What should I do in this case?

@jeroenheijmans
Copy link
Collaborator

You question is a wee bit hard to follow (and a block of formatted code (text) would be nicer than a screenshot), but from what I see I think you might have things backwards a bit.

Two things I notice from your URIs is:

  1. You pass all parameters already in the URI, but the library should be setting them instead (grant type, secrets, etc). If your server supports it, check out the /.well-known/openid-configuration endpoint, and you'll see it lists a token and/or authorize endpoint without any parameters yet. For comparison, check this example, or this one.
  2. You seem to want to use the Authorization Code flow, but see Announcement: Version 8 is coming #549 (and Support for Authorization code with PKCE #470, support Authorization Code Grant #507): this flow is not yet supported as of versions < 8.

So with current versions, you'd have to rewrite your app to rely on Implicit or Password (legacy) flows.

@ghost
Copy link
Author

ghost commented May 8, 2019

@jeroenheijmans
Thanks in advance for the answers.
I'll give you one more basic question.
What is the function to request a token?
initImplicitFlow() works just like window.open().

@jeroenheijmans
Copy link
Collaborator

That's not really easy to answer, I recommend first reading up about the implicit flow and possibly the password flow, before continuing implementation of oauth2/oidc in your app.

@jeroenheijmans jeroenheijmans added the question For tagging support requests and general questions. label Aug 4, 2019
@jeroenheijmans
Copy link
Collaborator

Hoping the questions got sufficiently answered (for as far as we reasonably can on the issues list of this specific library).

Let us know if you have any specific open issues left with this library, either here so we could reopen, or in a fresh issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question For tagging support requests and general questions.
Projects
None yet
Development

No branches or pull requests

1 participant