diff options
| author | Guillermo Serrahima <dev@vylion.com> | 2026-03-12 11:14:54 +0100 |
|---|---|---|
| committer | Guillermo Serrahima <dev@vylion.com> | 2026-03-12 11:14:54 +0100 |
| commit | 87f1d0fb7a22c18fa09ce584fa895e3b5b83c3c2 (patch) | |
| tree | f8ae8cc69d372fc14207b6311d0b10d531e08c81 /backend/auth/oauth.go | |
| parent | f5030ebe29e7391d2728d386ac50cbe60b82ab56 (diff) | |
| download | llostre-87f1d0fb7a22c18fa09ce584fa895e3b5b83c3c2.tar.xz llostre-87f1d0fb7a22c18fa09ce584fa895e3b5b83c3c2.zip | |
Directly redirect to sign in page
Diffstat (limited to 'backend/auth/oauth.go')
| -rw-r--r-- | backend/auth/oauth.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/backend/auth/oauth.go b/backend/auth/oauth.go index 012f339..b217ad2 100644 --- a/backend/auth/oauth.go +++ b/backend/auth/oauth.go @@ -95,7 +95,7 @@ func FetchOAuthMetadata(pdsURL string) (*OAuthMetadata, error) { return &metadata, nil } -func BuildAuthorizationURL(metadata *OAuthMetadata, config *OAuthConfig, state, codeChallenge string) string { +func BuildAuthorizationURL(metadata *OAuthMetadata, config *OAuthConfig, state, codeChallenge, handle string) string { params := url.Values{ "response_type": {"code"}, "client_id": {config.ClientID}, @@ -104,6 +104,7 @@ func BuildAuthorizationURL(metadata *OAuthMetadata, config *OAuthConfig, state, "code_challenge": {codeChallenge}, "code_challenge_method": {"S256"}, "scope": {"atproto"}, + "login_hint": {handle}, } return metadata.AuthorizationEndpoint + "?" + params.Encode() |
