Support for authentication via OAuth / OpenID Connect
See original GitHub issueThis has been discussed in #59 but with less scope than outlined below.
The Insomina REST client has native support for authenticating with the GraphQL server via OAuth 2.0, and therefore also OpenID Connect. It will also (automatically) refresh an access token if it has expired.
This has a number of advantages:
- The process of acquiring an access / refresh token is baked into the client, and only requires the user to enter authentication details - right now, an access token needs to be acquired elsewhere, and added to each request via a
Authorisation
header. - A GraphQL server which issues short-lived access tokens can be seemlessly supported by automatically refreshing any access token that has expired.
Could GraphiQL support this?
I’d love to be able to use GraphiQL but the second point in particular is a dealbreaker for me. As it currently stands, access tokens on my GraphQL server expire after 60 mins, and so every hour I would need to manually acquire an access token and set it in GraphiQL to continue using it.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
OpenID Connect
OpenID Connect 1.0 is a simple identity layer on top of the OAuth 2.0 protocol. It allows Clients to verify the identity of...
Read more >OAuth 2.0 and OpenID Connect Overview - Okta Developer
OpenID Connect is an authentication standard built on top of OAuth 2.0. It adds an additional token called an ID token. OpenID Connect...
Read more >OpenID Connect | Authentication - Google Developers
This document describes our OAuth 2.0 implementation for authentication, which conforms to the OpenID Connect specification, and is OpenID Certified.
Read more >OpenID Connect Protocol - Auth0
While OAuth 2.0 is about resource access and sharing, OIDC is about user authentication. Its purpose is to give you one login for...
Read more >4. Securing the Login with OAuth 2 and OpenID Connect
Authentication is the process of identifying a user against a service. OpenID was the first standard that aimed at providing a decentralized protocol...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://github.com/graphql/graphiql/issues/1771#issuecomment-765001323 to get you started
this project is mostly used by customized frameworks, and by projects like insomnia who use our LSP libraries. I’m pretty much the only recurring contributor, so there is no time to support such a thing. I’m available for paid consulting if you need more help with it, but most frontend devs can figure this one out it seems! i’ve worked at a handful of companies where they implemented an auth flow with GraphiQL themselves.
No problem, thank you for taking the time to reply and point me in the right direction. 🙂