Facebook Auth
Hello everyone, did anyone manage to implement Facebook auth? Is it possible?
Google auth doesn't work if the link is opened within Facebook for some reason, and email auth is a bit too hard (my target are not super young people), meaning that you need to add credentials, the email to verify your email goes always in spam, and if it's spam the link to click to open the app and verify is hidden, then if you manage to click that, you need to login by re-entering the credentials.
Are there ways to make the process more frictionless?
10 Replies
Hi @ChilledGab. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Based on the provided knowledge sources, there is no specific mention of Facebook authentication implementation in Wasp. However, the Wasp team is actively working on improving the authentication process to make it as frictionless as possible. For instance, they are considering implementing username-and-password as one of the providers and keeping the business logic User separate from auth models. This would allow the programmers to focus on the business logic while Wasp handles the authentication models source (https://github.com/wasp-lang/wasp/issues/1080).
For email authentication, Wasp is considering various improvements such as enabling email template previews, allowing users to change the default signup/login behavior, and possibly enabling CAPTCHAs during signup source (https://github.com/wasp-lang/wasp/issues/691).
As for the issue with Google auth not working when the link is opened within Facebook, it's not addressed in the provided sources. You might want to raise this issue on the Wasp's GitHub or Discord channel for further assistance.
Remember, these are ongoing discussions and improvements, so it's recommended to keep an eye on the Wasp's GitHub issues and Discord channels for the latest updates and best practices.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @ChilledGab, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?
@kapa.ai is there any way to get rid of email verification? I know it's needed but the project is very small and I'd like to try without it for starter, and then see how it goes and maybe implement it later. Like the user put email, password, and then create account and login automatically, that's it, without having to put credentials twice to create account and then login after veryfing the email
Let me check the knowledge base for you. One moment! :books:
----------------------
Yes, you can skip the email verification step in Wasp during development. You can do this by setting the
SKIP_EMAIL_VERIFICATION_IN_DEV
environment variable to true
in your .env.server
file. Here is how you can do it:
This setting is useful when you are developing your app and don't want to go through the email verification flow every time you sign up. It can also be useful when you are writing automated tests for your app source (https://wasp-lang.dev/docs/auth/email#email-verification-flow).
Please note that by default, Wasp requires the email to be verified before allowing the user to log in. This is done by sending a verification email to the user's email address and requiring the user to click on a link in the email to verify their email address. If you decide to implement email verification later, you can remove or set the SKIP_EMAIL_VERIFICATION_IN_DEV
environment variable to false
.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @ChilledGab, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?Have you tried using the username and password auth? It's the simplest and the login happens automatically after the login.
Hello Miho, thanks for jumping in! I'm using that but it won't login right after, it sends the verification email, and then after you tapped on that you need to add credentials once again
Not the email but the username and password 🙃 Have you checked out the Wasp docs?
I didn't consider that, was following more the open saas documentation, thank you very much!!
Wohooo @ChilledGab, you just became a Waspeteer level 2!
Hi @ChilledGab, thanks for the question and for waiting!
As you noticed, Wasp doesn't support Facebook auth natively.
@miho Is there maybe a way for users to implement this themselves? I don't think there is, but Miho knows best.
If not, have we ever discussed allowing this (implementation of a non-natively-supported social auth provider).
(my target are not super young people),Yeah, I feel your pain. @ChilledGab On the other hand, if you only need Facebook auth because of this:
Google auth doesn't work if the link is opened within Facebook for some reason...Let's focus on figuring that out. Can you elaborate (how to reproduce, what happens, does it work from somewhere else...)?
Created an issue for allowing wasp devs to create a custom auth provider: https://github.com/wasp-lang/wasp/issues/2194