Oauth2 providers
ShipClojure provides OAuth2 support for any login providers. By default, the Google provider is already setup.
Setting up Google login
Follow the steps here to create a google application and get your client-id
& client-secret
.
Important: Make sure the redirect URI set-up in your application matches the format
/oauth2/:provider/callback
which is the default for shipclojure
Add these properties to ~/.saas-secrets.edn
under [:oauth2-providers :google]
{:client-id "123" :client-secret" "123"}
That's it! Your google login should be ready
Adding a new OAuth2 Provider
Add the new entry in system.edn under
:oauth2/providers
Add the client secrets (
:client-id
&:client-secret
) in yourresources/.{prod|dev}-secrets.edn
file{:oauth2-providers {:google {:client-id "public client id" :client-secret "client secret"} :new-provider {:client-id "public client id" :client-secret "secret shhh!"}}}
Test your connection by visiting
/oauth2/:provider
and if everything was setup correctly, your new provider should work
Last updated