MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / generateNonce

Function generateNonce

internal/auth/auth.go:156–165  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

154}
155
156func generateNonce() string {
157 b := make([]byte, 16)
158 if _, err := rand.Read(b); err != nil {
159 // OAuth state nonce — an all-zero nonce defeats the CSRF
160 // protection it exists to provide. Panic rather than silently
161 // emit a predictable value.
162 panic(fmt.Sprintf("auth: crypto/rand failed: %v", err))
163 }
164 return hex.EncodeToString(b)
165}
166
167func validateCLICallbackURL(raw string) (*url.URL, error) {
168 if raw == "" {

Callers 1

HandleLoginMethod · 0.85

Calls 1

makeFunction · 0.85

Tested by

no test coverage detected