Volvo Connected: fix auth provider
This commit is contained in:
parent
2fb8513c79
commit
99c5f8cc3f
1 changed files with 4 additions and 3 deletions
|
|
@ -12,15 +12,16 @@ import (
|
|||
func init() {
|
||||
auth.Register("volvo-connected", func(other map[string]any) (oauth2.TokenSource, error) {
|
||||
var cc struct {
|
||||
ID, Secret string
|
||||
RedirectUri string
|
||||
ClientID string
|
||||
ClientSecret string
|
||||
RedirectUri string
|
||||
}
|
||||
|
||||
if err := util.DecodeOther(other, &cc); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
oc := OAuthConfig(cc.ID, cc.Secret, cc.RedirectUri)
|
||||
oc := OAuthConfig(cc.ClientID, cc.ClientSecret, cc.RedirectUri)
|
||||
|
||||
return NewOAuth(oc, "")
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue