Documentation ¶
Index ¶
- Constants
- Variables
- func DecodeJWT(jwt string) (string, string, error)
- func FetchJwt(ctx context.Context) (string, error)
- func GetClerkDomain() string
- func GetClerkRootURL() string
- func GetJwtFile() string
- func GetJwtPath() string
- func GetSessionURL(data *LoginData) string
- func HasSession() (bool, error)
- type LoginData
Constants ¶
View Source
const ( ClientSessionPathDev = "%s/v1/client?_clerk_js_version=4.50.1&__dev_session=%s" ClientSessionPathProd = "%s/v1/client?_clerk_js_version=4.50.1" )
Variables ¶
View Source
var ErrMissingEmail = errors.New("couldn't find email address in claims")
View Source
var ErrNoSessions = errors.New("no sessions found in response")
View Source
var HTML = `<!doctype html>` + "\n" +
`<html>
<head>
<meta charset="utf-8"/>
<title>Login</title>
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<h3>Successfully logged in as {{email}}</h3>
<div>Please close this tab or page and return to the CLI</div>
</body>
</html>`
HTML is shown to the user after they log in.
Functions ¶
func GetClerkDomain ¶
func GetClerkDomain() string
func GetClerkRootURL ¶ added in v0.1.10
func GetClerkRootURL() string
func GetJwtFile ¶
func GetJwtFile() string
func GetJwtPath ¶
func GetJwtPath() string
GetJwtPath returns the path to the jwt.json file where the JWT token is stored.
func GetSessionURL ¶
func HasSession ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.