MCPcopy Create free account
hub / github.com/rilldata/rill / AuthWithToken

Method AuthWithToken

admin/urls.go:219–226  ·  view source on GitHub ↗

AuthWithToken returns a URL that sets the auth cookie to the provided token. Providing a redirect URL is optional.

(tokenStr, redirect string)

Source from the content-addressed store, hash-verified

217// AuthWithToken returns a URL that sets the auth cookie to the provided token.
218// Providing a redirect URL is optional.
219func (u *URLs) AuthWithToken(tokenStr, redirect string) string {
220 res := urlutil.MustJoinURL(u.External(), "/auth/with-token") // NOTE: Uses custom domain if set.
221 res = urlutil.MustWithQuery(res, map[string]string{"token": tokenStr})
222 if redirect != "" {
223 res = urlutil.MustWithQuery(res, map[string]string{"redirect": redirect})
224 }
225 return res
226}
227
228// AuthVerifyEmailUI returns the frontend URL for the verify email page.
229func (u *URLs) AuthVerifyEmailUI() string {

Callers

nothing calls this directly

Calls 3

ExternalMethod · 0.95
MustJoinURLFunction · 0.92
MustWithQueryFunction · 0.92

Tested by

no test coverage detected