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

Method UpdateAppMetaDataProviders

internal/models/user.go:260–272  ·  view source on GitHub ↗

UpdateAppMetaDataProviders updates the provider field in AppMetaData column

(tx *storage.Connection)

Source from the content-addressed store, hash-verified

258
259// UpdateAppMetaDataProviders updates the provider field in AppMetaData column
260func (u *User) UpdateAppMetaDataProviders(tx *storage.Connection) error {
261 providers, terr := FindProvidersByUser(tx, u)
262 if terr != nil {
263 return terr
264 }
265 payload := map[string]interface{}{
266 "providers": providers,
267 }
268 if len(providers) > 0 {
269 payload["provider"] = providers[0]
270 }
271 return u.UpdateAppMetaData(tx, payload)
272}
273
274// UpdateUserEmail updates the user's email to one of the identity's email
275// if the current email used doesn't match any of the identities email

Callers 7

DeleteIdentityMethod · 0.80
linkIdentityToUserMethod · 0.80
processInviteMethod · 0.80
verifyGetMethod · 0.80
verifyPostMethod · 0.80

Calls 2

UpdateAppMetaDataMethod · 0.95
FindProvidersByUserFunction · 0.85

Tested by

no test coverage detected