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

Don't assume that id_token is present #170

Merged
merged 1 commit into from
Nov 6, 2019
Merged

Conversation

fizzyduck
Copy link
Contributor

Some providers (eg. Gitea) don't provide an id_token to cache the user info and that causes a panic.

This change checks to see if the key value is not nil before converting to a string.

With this change, Gitea can be used as a provider using either "github" or "oidc" as the configured provider.

Some providers (eg. Gitea) don't provide an id_token to cache the user info and that causes a panic.

This change checks to see if the key value is not nil before converting to a string.

With this change, Gitea can be used as a provider using either "github" or "oidc" as the configured provider.
bnfinet added a commit that referenced this pull request Nov 6, 2019
@bnfinet bnfinet merged commit 421d64f into vouch:master Nov 6, 2019
@bnfinet
Copy link
Member

bnfinet commented Nov 6, 2019

thanks @fizzyduck !

@layanto
Copy link

layanto commented Jan 31, 2020

Any example of vouch config.yml for Gitea?

@layanto
Copy link

layanto commented Jan 31, 2020

@fizzyduck, what url did you use for user_info_url with Gitea?

@layanto layanto mentioned this pull request Feb 1, 2020
@aaronpk
Copy link
Collaborator

aaronpk commented Feb 2, 2020

For future reference:

oauth:
  provider: github
  client_id: XXXXX
  client_secret: XXXXX
  callback_url: http://vouch.example/auth
  auth_url: https://gitea.example/login/oauth/authorize
  token_url: https://gitea.example/login/oauth/access_token
  user_info_url: https://gitea.example/api/v1/user?token=

bnfinet added a commit that referenced this pull request May 22, 2020
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.

4 participants