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

Validate access token on the server side in custom auth example #36

Open
pual opened this issue Jan 3, 2017 · 1 comment
Open

Validate access token on the server side in custom auth example #36

pual opened this issue Jan 3, 2017 · 1 comment

Comments

@pual
Copy link

pual commented Jan 3, 2017

There's a google = require('googleapis') dependency declared but never used.
It looks like every token received will get a valid session or will be created as a new user, I think there should be a token check against the google api !?

@jamesnocentini
Copy link
Contributor

It looks like every token received will get a valid session or will be created as a new user, I think there should be a token check against the google api !?

You're right. Ideally the sample project should check for the validity of the token on the server side. Things have changed slightly concerning Google Auth since it implements OpenIDConnect which Sync Gateway now supports. For 3rd party auth services that don't support OpenIDConnect you'll have to follow the auth flow you've described.

I'll leave this ticket open to track the ability to validate access tokens in the custom auth flow. But we might want to do it with another provider that doesn't support OpenIDConnect (maybe Twitter).

@jamesnocentini jamesnocentini changed the title google-sign-in example & app.js Validate access token on the server side in custom auth example Jan 3, 2017
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

2 participants