how i can Updata this Display name field not add it from meta_data

No description
5 Replies
garyaustin
garyaustin4w ago
It is derived from user_metadata. It is a combination of a bunch of possible JSON key names different OAuth providers use in that column. If you want your own username field you should create it in a profile table.
garyaustin
garyaustin4w ago
GitHub
Where is (auth) Display Name populated from? · supabase · Discuss...
Using auth.SignUp with email, password, in some testing i ended up with an first and last name in the Display Name field of the auth table. However, for the life of me I can't recall how I did ...
3Froto
3FrotoOP3w ago
thanks also there is something else
export async function verifyOtp(email: string, otp: string) {
const supabase = createClient();

const isPasswordReset = sessionStorage.getItem('isPasswordReset') == 'true';

const { data, error } = await supabase.auth.verifyOtp({
token: otp,
email,
type: isPasswordReset ? 'recovery' : 'email',
});

if (error) {
if (error.message?.includes('rate limit') || error.message?.includes('too many requests') || error.status === 429) {
throw new Error('Too many requests. Please wait a moment before trying again.');
}

if (error.message?.includes('invalid') || error.message?.includes('expired')) {
throw new Error('Invalid or expired OTP. Please try again.');
}

throw error;
}

return data;
}
export async function verifyOtp(email: string, otp: string) {
const supabase = createClient();

const isPasswordReset = sessionStorage.getItem('isPasswordReset') == 'true';

const { data, error } = await supabase.auth.verifyOtp({
token: otp,
email,
type: isPasswordReset ? 'recovery' : 'email',
});

if (error) {
if (error.message?.includes('rate limit') || error.message?.includes('too many requests') || error.status === 429) {
throw new Error('Too many requests. Please wait a moment before trying again.');
}

if (error.message?.includes('invalid') || error.message?.includes('expired')) {
throw new Error('Invalid or expired OTP. Please try again.');
}

throw error;
}

return data;
}
why OTP never expire after time can't i edit token lifetime
garyaustin
garyaustin3w ago
You should ask the question in a new topic as this has nothing to do with the topic here. I don't understand what your are asking about, maybe another user might. But you should probably be clearer on what your question is as you can set the OTP lifetime in the dashboard in email provider settings.
3Froto
3FrotoOP3w ago
yep this is question thanks sorry for not open a new topic ill do it next question sorry

Did you find this page helpful?