Search documentation of phoenix_kit

# PhoenixKitWeb.Plugs.EnsureOAuthScheme (phoenix_kit v1.7.87)

Copy Markdown View Source

Ensures correct HTTPS scheme for OAuth callback URL generation behind reverse proxies.

This plug checks (in order):

1. `X-Forwarded-Proto` header (nginx/apache standard)
2. Explicit `:phoenix_kit, :oauth_base_url` config
3. Endpoint URL configuration

## Usage

Automatically included in OAuth controller. No manual setup required.

## Configuration (Optional)

For edge cases where headers aren't available:

    config :phoenix_kit,
      oauth_base_url: "https://example.com"

## Summary

### Functions

call(conn, opts)
init(opts)

## Functions

# call(conn, opts)

# init(opts)