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

Add option to use IdToken instead of AccessToken #121

Merged
merged 1 commit into from
Apr 5, 2018
Merged

Add option to use IdToken instead of AccessToken #121

merged 1 commit into from
Apr 5, 2018

Conversation

sschadwick
Copy link
Contributor

@@ -18,6 +18,7 @@ auth: {
token_type: 'Bearer',
redirect_uri: undefined,
client_id: 'SET_ME',
id_token: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default shouldn't be false?

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. BTW what's your idea if we can generalize this option little more. Like having an option like tokenKey (or something better. I'm not good at naming!) that can be id_token/access_token or anything else.

@sschadwick
Copy link
Contributor Author

You're absolutely right, I've updated the commit. I like the idea of using tokenKey as the key but it would involve string matching, which is never my first choice. However, if that's how you want to proceed, how does this sound: tokenKey: 'access_token' and tokenKey: 'id_token'?

@pi0
Copy link
Member

pi0 commented Apr 5, 2018

@sschadwick Yep exactly what i was mean. Something like this:

let token = parsedQuery[this.options.tokenKey]

@sschadwick
Copy link
Contributor Author

Okay updated again. I used your suggestion but changed tokenKey to token_key to remain consistent with the other config options. Also added access_token as the default.

@pi0 pi0 merged commit 554a042 into nuxt-community:dev Apr 5, 2018
@pi0
Copy link
Member

pi0 commented Apr 5, 2018

Thanks for your contribution!

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.

None yet

2 participants