AuthWithToken returns a URL that sets the auth cookie to the provided token. Providing a redirect URL is optional.
(tokenStr, redirect string)
| 217 | // AuthWithToken returns a URL that sets the auth cookie to the provided token. |
| 218 | // Providing a redirect URL is optional. |
| 219 | func (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. |
| 229 | func (u *URLs) AuthVerifyEmailUI() string { |
nothing calls this directly
no test coverage detected