🚀
ShipClojure
  • README
  • Development
    • Getting Started
    • REPL Workflow
    • AI Development with ShipClojure
    • Getting Updates
    • Formatting code
    • ShipClojure Guiding Principles
  • Backend
    • Migrations
    • Secrets
    • Routing
    • ShipClojure Blog
    • Email
  • Frontend
    • UIx + re-frame
    • HTTP Requests with Re-frame
    • Frontend Navigation with Re-frame
    • Toast Notifications
    • Icons
  • Server Side Rendering
    • Static/Landing pages
  • Auth
    • How Auth works
    • Oauth2 providers
  • Deployment
    • Deployment
  • Decisions
    • 001 - Cookie Sessions
    • 002 - Single Page Application Architecture
    • 003 - Re-frame instead of Refx
    • 003 - Move from cookie sessions to JWT Access + refresh tokens
Powered by GitBook
On this page
  • Setting up Google login
  • Adding a new OAuth2 Provider
  1. Auth

Oauth2 providers

PreviousHow Auth worksNextDeployment

Last updated 1 month ago

ShipClojure provides for any login providers. By default, the Google provider is already setup.

Setting up Google login

Follow the steps 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

  1. Add the new entry in under :oauth2/providers

  2. Add the client secrets (:client-id & :client-secret) in your resources/.{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!"}}}
  3. Test your connection by visiting /oauth2/:provider and if everything was setup correctly, your new provider should work

OAuth2 support
here
system.edn