Skip to content

Commit

Permalink
feat: support sign_in_attributes for SAML
Browse files Browse the repository at this point in the history
  • Loading branch information
SpringMT committed Nov 21, 2024
1 parent 4d55c62 commit 87cf95e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,10 @@ type Token struct {
//
// This data is provided by the Firebase Auth service and is a reserved claim in the ID token.
type FirebaseInfo struct {
SignInProvider string `json:"sign_in_provider"`
Tenant string `json:"tenant"`
Identities map[string]interface{} `json:"identities"`
SignInProvider string `json:"sign_in_provider"`
SignInAttributes map[string]interface{} `json:"sign_in_attributes"`
Tenant string `json:"tenant"`
Identities map[string]interface{} `json:"identities"`
}

// baseClient exposes the APIs common to both auth.Client and auth.TenantClient.
Expand Down
5 changes: 3 additions & 2 deletions auth/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1363,8 +1363,9 @@ func getIDTokenWithSignerAndKid(signer cryptoSigner, kid string, p mockIDTokenPa
"auth_time": testClock.Now().Unix() - 100,
"sub": "1234567890",
"firebase": map[string]interface{}{
"identities": map[string]interface{}{},
"sign_in_provider": "custom",
"identities": map[string]interface{}{},
"sign_in_provider": "custom",
"sign_in_attributes": map[string]interface{}{},
},
"admin": true,
}
Expand Down

0 comments on commit 87cf95e

Please sign in to comment.