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

Skipping a scope of "openid connect" or "email" results in panic #39

Open
mahadevans87 opened this issue Nov 10, 2022 · 2 comments
Open

Comments

@mahadevans87
Copy link

mahadevans87 commented Nov 10, 2022

I was trying to do google OAuth 2.0 login with the following scope -

	goth.UseProviders(
		gothGoogle.New(os.Getenv("OAUTH_KEY"), os.Getenv("OAUTH_SECRET"), "http://localhost:3000/auth/callback", "https://www.googleapis.com/auth/drive.metadata.readonly"),
	)

This results in goth crashing at gothv1,74.1/providers/google/session.go during authorize and token exchange -
On line 44, goth assumes that an id_token is always returned. However, only if we add "email" or "open_id connect" in the scopes, we will get the scope. Otherwise, goth crashes because id_token is never returned.

image

If you are okay, I can submit a PR for this.

@DeZeeKees
Copy link

is there a way to fix this?

@DeZeeKees
Copy link

im running into the same problem

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