firebase / firebase/firebase-tools

Authentication: SAML Custom Attributes are not supported

Open
#3,698 1 comment 1 reaction 1 assignee Claimed by @yuchenshi View on GitHub
internal-bug-filed
Dominant language
TypeScript
Stars
4.5k
Forks
1.3k
Avg merge
1d 12h
Merged PRs (30d)
84

Description

It would be nice if the auth emulator supported a toggle of where its custom claims are applied. In the case of the Identity Platform's SAML provider, it needs to populate in `firebase.sign_in_attributes`, such as:

```json
{
"iss": "https://securetoken.google.com/myapp",
"aud": "myapp",
"auth_time": 1628461622,
"user_id": "JaWznJClYW5nvHnePGRB6RwVh1",
"sub": "JaWznJ6QW5nvHnePGRB6RwVh1",
"iat": 1628461622,
"exp": 1628465222,
"email": "john@myapp.com",
"email_verified": true,
"firebase": {
"identities": {
"saml.myapp": [
"john@myapp.com"
],
"email": [
"john@myapp.com"
]
},
"sign_in_provider": "saml.myapp",
"sign_in_attributes": {
"uid": "12346",
"mail": "john@myapp.com",
"surname": "Gasper",
"givenName": "John"
}
}
}

A work around would be to allow me to override the claims key check forbidding the use of the `firebase` key and merge my block with the default:
```json
{
"firebase": {
"sign_in_attributes": {
"uid": "12346",
"mail": "john@myapp.com",
"surname": "Gasper",
"givenName": "John"
}
}
}
```

I suspect this might be helpful in working with the other Identity Platform auth providers too.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.