OpenID with absinthe any examples or hints

Hi everyone,

Is there any example how to implement an absinthe social login on the following providers:

gmail
github
facebook

without a library?

if not what solutions are available for social login in absinthe?

Also found this that helped me realise the differences between oauth2 and openid good read https://blog.runscope.com/posts/understanding-oauth-2-and-openid-connect
Thanks for the help and guidance in advance

Why?

The means by which you authenticate aren’t really within the scope of what Absinthe handles, and isn’t super relevant to GraphQL. We use Uberuath / UberauthGoogle to handle our google single sign on. Users sign on via google, and then we issue them an auth token, and they make follow on GraphQL requests with that auth token just like any other user.

The actual back and forth that happens with oauth / openid doesn’t really involve GraphQL / Absinthe at all.

1 Like

Because i didn’t want to have many dependencies in my app.

So using the Uberauth and Uberauth providers in a middleware or how should I setup this?

Because when I checked Uberauth and uberauth social providers I couldn’t find how They are setup for an absinthe app.

Can you provide a minimal example so I can understand better what you meant with:

Thanks you for the help and explanations so far

They do not integrate with Absinthe at all. Use the examples in the ueberauth guides, it’s what I did. The oauth flow requires certain endpoints to exist that follow a certain spec, and that spec has nothing to do with absinthe. You do the outh2 flow as you would with any other API, and then at the end when you have some kind of auth token you use that with your GraphQL api just as you would an auth token you created via some other means.

1 Like