mirror of
https://github.com/pocketbase/pocketbase.git
synced 2025-04-22 15:57:52 +02:00
[#6657] allow OIDC email_verified to be int or boolean string
This commit is contained in:
parent
42a008f828
commit
32de8ed04a
@ -1,3 +1,8 @@
|
|||||||
|
## v0.26.6
|
||||||
|
|
||||||
|
- Allow OIDC `email_verified` to be int or boolean string since some OIDC providers like AWS Cognito has non-standard userinfo response ([#6657](https://github.com/pocketbase/pocketbase/pull/6657)).
|
||||||
|
|
||||||
|
|
||||||
## v0.26.5
|
## v0.26.5
|
||||||
|
|
||||||
- Fixed canonical URI parts escaping when generating the S3 request signature ([#6654](https://github.com/pocketbase/pocketbase/issues/6654)).
|
- Fixed canonical URI parts escaping when generating the S3 request signature ([#6654](https://github.com/pocketbase/pocketbase/issues/6654)).
|
||||||
|
@ -2,6 +2,11 @@
|
|||||||
> For the most recent versions, please refer to [CHANGELOG.md](./CHANGELOG.md)
|
> For the most recent versions, please refer to [CHANGELOG.md](./CHANGELOG.md)
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## v0.22.34
|
||||||
|
|
||||||
|
- (_Backported from v0.26.6_) Allow OIDC `email_verified` to be int or boolean string since some OIDC providers like AWS Cognito has non-standard userinfo response ([#6657](https://github.com/pocketbase/pocketbase/pull/6657)).
|
||||||
|
|
||||||
|
|
||||||
## v0.22.33
|
## v0.22.33
|
||||||
|
|
||||||
- (_Backported from v0.26.3_) Fixed and normalized logs error serialization across common types for more consistent logs error output ([#6631](https://github.com/pocketbase/pocketbase/issues/6631)).
|
- (_Backported from v0.26.3_) Fixed and normalized logs error serialization across common types for more consistent logs error output ([#6631](https://github.com/pocketbase/pocketbase/issues/6631)).
|
||||||
|
@ -92,7 +92,7 @@ func (p *OIDC) FetchAuthUser(token *oauth2.Token) (*AuthUser, error) {
|
|||||||
Username string `json:"preferred_username"`
|
Username string `json:"preferred_username"`
|
||||||
Picture string `json:"picture"`
|
Picture string `json:"picture"`
|
||||||
Email string `json:"email"`
|
Email string `json:"email"`
|
||||||
EmailVerified bool `json:"email_verified"`
|
EmailVerified any `json:"email_verified"` // see #6657
|
||||||
}{}
|
}{}
|
||||||
if err := json.Unmarshal(data, &extracted); err != nil {
|
if err := json.Unmarshal(data, &extracted); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -110,7 +110,7 @@ func (p *OIDC) FetchAuthUser(token *oauth2.Token) (*AuthUser, error) {
|
|||||||
|
|
||||||
user.Expiry, _ = types.ParseDateTime(token.Expiry)
|
user.Expiry, _ = types.ParseDateTime(token.Expiry)
|
||||||
|
|
||||||
if extracted.EmailVerified {
|
if cast.ToBool(extracted.EmailVerified) {
|
||||||
user.Email = extracted.Email
|
user.Email = extracted.Email
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user