MCPcopy Create free account
hub / github.com/supabase/auth / prepRedirectURL

Method prepRedirectURL

internal/api/verify.go:516–532  ·  view source on GitHub ↗
(message string, rurl string, flowType models.FlowType)

Source from the content-addressed store, hash-verified

514}
515
516func (a *API) prepRedirectURL(message string, rurl string, flowType models.FlowType) (string, error) {
517 u, perr := url.Parse(rurl)
518 if perr != nil {
519 return "", perr
520 }
521 hq := url.Values{}
522 q := u.Query()
523 hq.Set("message", message)
524 if flowType == models.PKCEFlow {
525 q.Set("message", message)
526 }
527 u.RawQuery = q.Encode()
528 // Add Supabase Auth identifier to help clients distinguish Supabase Auth redirects
529 hq.Set("sb", "")
530 u.Fragment = hq.Encode()
531 return u.String(), nil
532}
533
534func (a *API) prepPKCERedirectURL(rurl, code string) (string, error) {
535 u, err := url.Parse(rurl)

Callers 2

verifyGetMethod · 0.95
TestPrepRedirectURLMethod · 0.80

Calls 3

SetMethod · 0.80
EncodeMethod · 0.80
StringMethod · 0.45

Tested by 1

TestPrepRedirectURLMethod · 0.64