Skip to content

Commit e4e586f

Browse files
authored
Merge pull request #328 from aspnetzero/update-social-login-doc-for-open-id-mappings
Update social login documen for open id claims mapping
2 parents 510334a + bf9ac51 commit e4e586f

File tree

2 files changed

+42
-8
lines changed

2 files changed

+42
-8
lines changed

docs/en/Features-Angular-Social-Logins.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ In addition to social logins, ASP.NET Zero includes OpenId Connect Login integra
6464
"Authority": "",
6565
"LoginUrl": "",
6666
"ValidateIssuer": "true",
67+
"ResponseType": "id_token",
6768
"ClaimsMapping": []
6869
}
6970
```
@@ -72,10 +73,26 @@ In some cases, OpenId Connect provider doesn't return claims we want to use. For
7273

7374
````json
7475
"ClaimsMapping": [
75-
{
76-
"claim": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier",
77-
"key": "http://schemas.microsoft.com/identity/claims/objectidentifier"
78-
}
76+
{
77+
"claim": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier",
78+
"key": "id"
79+
},
80+
{
81+
"claim": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name",
82+
"key": "name"
83+
},
84+
{
85+
"claim": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname",
86+
"key": "given_name"
87+
},
88+
{
89+
"claim": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname",
90+
"key": "family_name"
91+
},
92+
{
93+
"claim": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress",
94+
"key": "email"
95+
}
7996
]
8097
````
8198

docs/en/Features-Mvc-Core-Social-Logins.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ In addition to social logins, ASP.NET Zero includes OpenId Connect Login integra
5858
"ClientId": "",
5959
"ClientSecret": "",
6060
"ValidateIssuer": "true",
61+
"ResponseType": "id_token",
6162
"ClaimsMapping": []
6263
}
6364
```
@@ -66,10 +67,26 @@ In some cases, OpenId Connect provider doesn't return claims we want to use. For
6667

6768
```json
6869
"ClaimsMapping": [
69-
{
70-
"claim": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier",
71-
"key": "http://schemas.microsoft.com/identity/claims/objectidentifier"
72-
}
70+
{
71+
"claim": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier",
72+
"key": "id"
73+
},
74+
{
75+
"claim": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name",
76+
"key": "name"
77+
},
78+
{
79+
"claim": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname",
80+
"key": "given_name"
81+
},
82+
{
83+
"claim": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname",
84+
"key": "family_name"
85+
},
86+
{
87+
"claim": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress",
88+
"key": "email"
89+
}
7390
]
7491
```
7592

0 commit comments

Comments
 (0)