chore: upgrade to oidc v2 release (#5437)

* chore: upgrade to oidc v2 release

* fix tests

* fix build errors after rebase

* pin oidc v2.1.0

* pin oidc v2.1.1 (include bugfix)

* pin oidc v2.1.2 (include bugfix)

* pin oidc v2.2.1 (bugfix)

include fix zitadel/oidc#349

* fix: refresh token handling

* simplify cognitive complexity

* fix: handle error

---------

Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
Tim Möhlmann
2023-03-28 14:28:56 +03:00
committed by GitHub
parent 542271b467
commit 25c3c17986
25 changed files with 362 additions and 249 deletions

View File

@@ -21,7 +21,7 @@ type Provider struct {
isAutoCreation bool
isAutoUpdate bool
useIDToken bool
userInfoMapper func(info oidc.UserInfo) idp.User
userInfoMapper func(info *oidc.UserInfo) idp.User
authOptions []rp.AuthURLOpt
}
@@ -77,9 +77,9 @@ func WithSelectAccount() ProviderOpts {
}
}
type UserInfoMapper func(info oidc.UserInfo) idp.User
type UserInfoMapper func(info *oidc.UserInfo) idp.User
var DefaultMapper UserInfoMapper = func(info oidc.UserInfo) idp.User {
var DefaultMapper UserInfoMapper = func(info *oidc.UserInfo) idp.User {
return NewUser(info)
}