Skip to content

jmind-systems/go-apple-signin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sign In With Apple SDK

Docs Go Report Version

🍎 Golang client for Sign in with Apple.

Install it with command below

go get github.com/jmind-systems/go-apple-signin

You can take a look and inspire by following examples

Example

package main

import (
    "fmt"
    "os"
    "time"

    "github.com/jmind-systems/go-apple-signin"
)

func main() {
    // Pass credentials: team_id, client_id and key_id.
    opts := apple.WithCredentials("x", "y", "z")

    // Create the client.
    client, err := apple.NewClient(opts)
    if err != nil {
        return nil, err
    }

    // Load your p8 key into the client.
    if err := client.LoadP8CertByByte([]byte("")); err != nil {
        return nil, err
    }

    // Now client is ready.
    resp, err := p.client.Authenticate(ctx, "xxx-xxx")
    if err != nil {
        return nil, err
    }
}

License

Project released under the terms of the MIT license.