Documentation
¶
Overview ¶
Package apple holds what Sign in with Apple needs beyond OpenID Connect: the client secret (a JWT signed with the developer's key) and the revocation of a user's tokens.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Revoke ¶
func Revoke(ctx context.Context, c *oauth2.Client, p sso.Provider, clientID, clientSecret, refreshToken string) error
Revoke tells Apple to revoke a refresh token, which ends the user's link between the app and their Apple ID. clientID is the one the token was issued to. A token Apple no longer knows counts as revoked.
Types ¶
type Signer ¶
type Signer struct {
// Now is the clock; time.Now when nil.
Now func() time.Time
// contains filtered or unexported fields
}
Signer makes and caches Apple's client secrets.
func (*Signer) ClientSecret ¶
ClientSecret returns the client secret to send to Apple for the provider and the client id it acts as (the Services ID, or an app's bundle id), signed with the private key (the .p8 file's PEM). It is cached and renewed before it expires.