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

Add ID token verification to the generic provider #3761

Open
5 tasks done
osbornk opened this issue Feb 16, 2024 · 0 comments
Open
5 tasks done

Add ID token verification to the generic provider #3761

osbornk opened this issue Feb 16, 2024 · 0 comments
Labels
feat New feature or request.

Comments

@osbornk
Copy link
Contributor

osbornk commented Feb 16, 2024

Preflight checklist

Ory Network Project

No response

Describe your problem

We have an existing native login experience on our mobile app and cannot use browser redirects for various reasons. So, we want to mimic the same experience that the Google SDK and Apple SDKs currently support for submitting an ID token to Kratos during login.

This is the login that I am referring to:

POST https://{host}/self-service/login?flow={flow_id}
{
     "method": "oidc",
     "provider": "generic",
     "id_token": "{id_token}",
     "id_token_nonce": "{nonce}"
}

It looks like the work for this was done for the Google and Apple providers in #3515. But this does not work for the generic provider, which is what we will be using.

Describe your ideal solution

I plan on implementing ID token verification for the generic provider like what was done for Google and Apple already. The primary difference is that the Issuer URL and JWKS URI will not be hard-coded. The Issuer URL is already in configuration and just needs to be exposed.

The JWKS URI should be available through the gooidc library. I believe that library already derives the JWKS URI when it validates the ID token for the traditional OIDC flow.

There may also be some minor refactoring to the Google and Apple providers to use any changes we make to the generic provider for ID token verification.

Workarounds or alternatives

We considered using browser redirects through the traditional OIDC flow, but that adds the complexity of having to implement Hydra or some other full OAuth2 service.

Version

1.1.0

Additional Context

No response

@osbornk osbornk added the feat New feature or request. label Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request.
Projects
None yet
Development

No branches or pull requests

1 participant