func()

in pkce/pkce.go [66:84]


func (p *Provider) BeginAuth(state string) (goth.Session, error) {
	cv, err := codeVerifier()
	if err != nil {
		return nil, err
	}

	cc := codeChallenge(cv)

	s := &Session{
		AuthURL: p.Config.AuthCodeURL(
			state,
			oauth2.SetAuthURLParam("code_challenge", cc),
			oauth2.SetAuthURLParam("code_challenge_method", "S256"),
		),
		CodeVerifier: cv,
	}

	return s, nil
}