You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 20, 2024. It is now read-only.
So far I am liking Vercel far more than Firebase, but there is 1 thing I feel like is missing:
Built-in Auth system.
What I have in mind is similar to Authentication in Firebase projects (should be self-explanatory, below is just personal views about the subject).
The User-entities which contain metadata about the User (like username, email, password, etc....) should be securely stored in a different database which is not the Postgres or other database that the user adds to the project, but instead there should be, in lack of better word, a "hidden" Auth-database (in Firebase you cannot access the database where Auth Users are directly) which would be accessed by a simple UI where you could do CRUD for Auth Users and enable/disable different providers (email/password, Github, Gitlab, social media providers, etc...), configure 2FA, etc....
Also would be cool to have the Auth-email system similar to what Firebase has, like Password recovery, Email verification, etc....
Obviously this would need some kind of Admin/Auth-SDK to handle this stuff from the code-side.
As a barebones example, here is my usual User Creation for Admin workflow with Firebase/Firestore:
Add user info in the "Add User Form".
Submit form.
Form data is processed into NewUser-object that contains data given in the form and generated data like timestamps.
Send the data to a Cloud Function which uses the data from the request with the createUser()-function from Firebase Admin SDK (for server-side) to add new Auth User to Firebase Auth.
Then after creating new Auth User, create new AppUser-document to the Users-collection in Firestore, using the provided data, except for the password.
After the Auth User and AppUser have been created and linked to each other with UUID, inform the person for whom you created the user (this is vague, sometimes not a programmed solution but just a call to the person. but might be an email-solution).
Alternatively, if users Register themselves, then its this:
Add user info the "Registration Form".
Submit form.
Form data is processed into NewUser-object (similar/same as above).
Create new Auth User using the createUserWithEmailAndPassword-function from Firebase Auth SDK (for client-side).
After the new Auth User is succesfully created, create the AppUser-document to Users-collection in Firestore using the NewUser-object data.
Redirect the new logged-in user to the dashboard.
Currently if I want to achieve these things with Vercel, I would need to implement Auth0 or other solution manually and store the hashed password/other critical info to the same database where my project's data is, which can be error prone and produces an extra privacy risk. And I don't think adding extra-database to the project as "Auth-DB" or whatever would serve the purpose. (I don't know exactly how Firebase has implemented this system).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
So far I am liking Vercel far more than Firebase, but there is 1 thing I feel like is missing:
Built-in Auth system.
What I have in mind is similar to Authentication in Firebase projects (should be self-explanatory, below is just personal views about the subject).
The User-entities which contain metadata about the User (like username, email, password, etc....) should be securely stored in a different database which is not the Postgres or other database that the user adds to the project, but instead there should be, in lack of better word, a "hidden" Auth-database (in Firebase you cannot access the database where Auth Users are directly) which would be accessed by a simple UI where you could do CRUD for Auth Users and enable/disable different providers (email/password, Github, Gitlab, social media providers, etc...), configure 2FA, etc....
Also would be cool to have the Auth-email system similar to what Firebase has, like Password recovery, Email verification, etc....
Obviously this would need some kind of Admin/Auth-SDK to handle this stuff from the code-side.
As a barebones example, here is my usual User Creation for Admin workflow with Firebase/Firestore:
Alternatively, if users Register themselves, then its this:
Currently if I want to achieve these things with Vercel, I would need to implement Auth0 or other solution manually and store the hashed password/other critical info to the same database where my project's data is, which can be error prone and produces an extra privacy risk. And I don't think adding extra-database to the project as "Auth-DB" or whatever would serve the purpose. (I don't know exactly how Firebase has implemented this system).
Beta Was this translation helpful? Give feedback.
All reactions