apple

package
v0.9.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 14 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func (s *Signer) ClientSecret(p sso.Provider, clientID, privateKeyPEM string) (string, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL