main
Last change
on this file was 87c9f1e, checked in by Naum Shapkarovski <naumshapkarovski@…>, 6 weeks ago |
update the seed script. update the prisma schema, use mapping
|
-
Property mode
set to
100644
|
File size:
737 bytes
|
Rev | Line | |
---|
[87c9f1e] | 1 | const admin = require('firebase-admin');
|
---|
| 2 | const serviceAccount = require('../service-account.json');
|
---|
| 3 |
|
---|
| 4 | // Initialize Firebase Admin
|
---|
| 5 | admin.initializeApp({
|
---|
| 6 | credential: admin.credential.cert(serviceAccount)
|
---|
| 7 | });
|
---|
| 8 |
|
---|
| 9 | async function verifyUserEmail() {
|
---|
| 10 | const uid = 'dK2y3WezYWWltHCaBRvUFlddkOr2';
|
---|
| 11 |
|
---|
| 12 | try {
|
---|
| 13 | // Update the user's email verified status
|
---|
| 14 | await admin.auth().updateUser(uid, {
|
---|
| 15 | emailVerified: true,
|
---|
| 16 | });
|
---|
| 17 |
|
---|
| 18 | // Get the updated user to confirm
|
---|
| 19 | const user = await admin.auth().getUser(uid);
|
---|
| 20 | console.log('User email verified successfully');
|
---|
| 21 | console.log('User details:', user.toJSON());
|
---|
| 22 | } catch (error) {
|
---|
| 23 | console.error('Error verifying user email:', error);
|
---|
| 24 | }
|
---|
| 25 | }
|
---|
| 26 |
|
---|
| 27 | // Run the function
|
---|
| 28 | verifyUserEmail(); |
---|
Note:
See
TracBrowser
for help on using the repository browser.