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

Conversation

Projects
None yet
2 participants
@sschadwick
Contributor

sschadwick commented Apr 4, 2018

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

This comment has been minimized.

@pi0

pi0 Apr 4, 2018

Member

Default shouldn't be false?

@pi0

pi0 requested changes Apr 4, 2018 edited

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

This comment has been minimized.

Contributor

sschadwick commented Apr 5, 2018

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

This comment has been minimized.

Member

pi0 commented Apr 5, 2018

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

let token = parsedQuery[this.options.tokenKey]
@sschadwick

This comment has been minimized.

Contributor

sschadwick commented Apr 5, 2018

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 approved these changes Apr 5, 2018

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

@pi0

This comment has been minimized.

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