Authority
  • Introduction
  • In Action
  • Performance at Scale
  • Roadmap / Features
  • Getting Started
    • Introduction
    • Installation
    • Configuration Overview
  • Authentication
    • Authentication Guide
    • API Documentation
    • Customizing Authentication
  • Security & Error Handling
    • Security Considerations
    • Error Handling & Troubleshooting
  • Providers
    • Client Providers
    • Owner Providers
  • API Endpoints
    • API Endpoints
  • DEVELOPMENT
    • Requirements
    • Database
    • User Interface
    • Specs
    • Deployment
      • Environment Variables
  • Reference
    • OAuth Terms
    • OAuth 2 Grant Flows
      • Device Flow
      • Authorization Flow
      • Client Credentials Flow
      • Refreshing Access Tokens
      • Access Token Response
      • Json Web Tokens
      • Legacy: Implicit grant
      • Legacy: Password
    • Open ID Connect
      • Configuration
      • Registering Clients
      • User Info
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Authentication

Customizing Authentication

You can modify the default behavior of the Authority authentication system by extending the authentication logic.

Custom OAuth Providers

To add a custom OAuth provider, modify the OAuth::Client configuration in the src/auth.cr file:

OAuth::Client.new do |config|
  config.client_id = ENV["CUSTOM_OAUTH_CLIENT_ID"]
  config.client_secret = ENV["CUSTOM_OAUTH_CLIENT_SECRET"]
end

This allows you to connect to other OAuth providers or implement custom authentication logic.

PreviousAPI DocumentationNextSecurity Considerations

Last updated 7 months ago

Was this helpful?