add backend support for Apple auth provider
It's a bit different from other OAuth providers and requires a different set of options and a private key file.
This commit is contained in:
committed by
Umputun
parent
d7e9be99f9
commit
c1b3fba344
+5
-1
@@ -208,7 +208,11 @@ func (ah *AppleHandler) initPrivateKey() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
ah.conf.publicKey = ah.conf.privateKey.(*ecdsa.PrivateKey).Public()
|
||||
publicKey, ok := ah.conf.privateKey.(*ecdsa.PrivateKey)
|
||||
if !ok {
|
||||
return fmt.Errorf("provided private key is not ECDSA")
|
||||
}
|
||||
ah.conf.publicKey = publicKey.Public()
|
||||
ah.conf.clientSecret, err = ah.createClientSecret()
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user