Ask A Question


You’re not receiving notifications from this thread.

Recomendations for a javascript frontend library that can authenticate against Doorkeeper/oAuth OpenID using PKCE

Freibuis asked in Javascript

Pretty much as the title says.. I am looking for a javascript library that can authenticate against Doorkeeper.
We currently have a really old in-house authentication process and migrating to build a brand new federation Idp system that is built around devise/doorkeeper.

all our front ends spa's need to migrate to use doorkeeper/openid using PKCE. the issue is
we have tried the following libraries to limited success
@azure/msal-browser can't use this because the authority URL has to be https so cant be used in development without hassle.
@auth0/auth0-spa-js works against auth0 but its a pain to get it to work against doorkeeper as they uses no standard oauth standard routes creating custom routes in rails alsmost works.

any one know of any great libraries that you use that work really well against doorkeeper using PKCE auth code flow?


One library you could consider is Okta's Okta Auth JS library, which supports PKCE and can be used with custom OAuth2 providers like Doorkeeper. Another option is OIDC Client, which also supports PKCE and can be configured to work with custom OAuth2 providers. Both libraries have good documentation and community support, so they may be worth exploring for your use case.

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 71,933+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

    © 2023 GoRails, LLC. All rights reserved.