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

Implement Google GIS for web. #257

Closed
wants to merge 4 commits into from
Closed

Conversation

axi
Copy link

@axi axi commented Feb 3, 2023

This is probably a "work in progress".
I'm able to login but:

  • I'm not using grantOfflineAccess anymore and I don't know the impacts
  • Scope is not used anymore as the "authentication only" functionnality does not need it, again, not sure of the impacts
  • I added a third party library (jose) to decode JWT (I just picked one), not sure it the right thing to do (probably not)
  • I didn't update changelog nor readme

Let me know

@axi
Copy link
Author

axi commented Feb 3, 2023

The #202 and #231 issues should know about that

@reslear
Copy link
Collaborator

reslear commented Feb 3, 2023

please use prettier for format

@reslear
Copy link
Collaborator

reslear commented Feb 3, 2023

thx for contributing :)

you use Implicit flow or Authorization code flow ?

@axi
Copy link
Author

axi commented Feb 3, 2023

It looks like google implemented a system different from the oauth2 we knows.
I think it's named One Tap JS.
I used this documentation & that one.

I did try earlier with Implicit flow following this and using requestAccessToken(). I was getting a Bearer I could use in next requests but didn't find a way to get user informations that way

@reslear
Copy link
Collaborator

reslear commented Feb 4, 2023

we need use https://developers.google.com/identity/oauth2/web/guides/use-code-model
and then create simple request like oauth to get user

ok, need investigate but many users use Code flow

@axi
Copy link
Author

axi commented Feb 6, 2023

Authorisation Code Flow require a backend endpoint ("Your backend platform hosts an authorization code endpoint and receives the code"), I'm not sure that's what we want, is it ?

@axi
Copy link
Author

axi commented Feb 6, 2023

As written here

Several scopes are used only for user authentication: email, profile, and openid. If your app only uses these scopes, consider if a JWT ID Token and Sign In With Google for user sign-up and sign-in meets your needs. In most cases, this is the most straightforward and simple method available for user authentication.

There are simpler ways to handle authentication if we only need email, profile and openid scopes

@reslear
Copy link
Collaborator

reslear commented Feb 6, 2023

maybe there are two ways to implement

@axi
Copy link
Author

axi commented Feb 6, 2023

Sure.
Who can decide which implementation is needed ?
Does someone already use this plugin with other scopes than email profile openid ? If the answer is maybe, then it should still be the case after this (and my current implementation is wrong)

@axi
Copy link
Author

axi commented Feb 6, 2023

I worked on a new version using implicit workflow, supporting scopes. I'll share it tomorrow

@axi
Copy link
Author

axi commented Feb 7, 2023

Probably #259 is better

@reslear reslear closed this Nov 29, 2023
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.

2 participants