OAuth authentication

I’m a little confused by Netlify Identity’s support for OAuth. It seems like Netlify is providing an OAuth “proxy” to handle the server side of OAuth dance, is that correct? But your documentation says that you support only GitHub, GitLab, and Bitbucket. If I find some other service that I want my app to consume and that service’s API is secured via OAuth, am I out of luck?

Hi there and sorry to be slow to get back to you.

I think that the final answer will depend on how you are using OAuth - for instance with Identity (https://www.netlify.com/docs/identity/) the backing authentication service is gotrue (https://github.com/netlify/gotrue) which our running instance of does not support any additional authentication services for, at present. However as you can see that is an open source service you could fork and run your own copy of and augment in any way you like (such as https://github.com/netlify/gotrue/issues/122).

To respond to your additional questions in Netlify Identity integrating with Keycloak identity provider which are clearly about identity:

  1. no - no way to add additional auth providers that our service will support
  2. it depends (well, obviously you can’t choose your own provider) but you can either limit the auth providers in the Identity settings OR (this is a non-exclusive OR ;)) you can choose to modify the identity widget you would likely use (https://github.com/netlify/netlify-identity-widget) to process signups and logins to limit what it shows.

If I guessed wrong and you aren’t talking about using OAuth with Identity, could you let me know some more details about how you are trying to use it?

I’m not sure we’re talking about the same scenario. Let me give you an example to make this more concrete. If I wanted to write a Web app that consumes one or more Google APIs or Twitter’s API–both of which are secured using OAuth–could I do that with Netlify?

I’ll address the Keycloak issue back in the other thread.

Couldn’t say - we don’t really help you write that kind of code. Someone else in the community may, but our employees probably won’t :slight_smile: It is my understanding that OAuth is a bit dynamic so you’d need something like a function: https://www.netlify.com/docs/functions/ to handle any dynamic bits.

Maybe there is some good code you could borrow from here? https://functions.netlify.com/examples/