W
Wasp-langRicardo Batista

Disable email login

If I only want Google signup, is there a way to remove the email login? I tried commenting
email: {
fromField: {
name: "Meeting Reminders",
email: "hey@meeting-reminders.com"
},
emailVerification: {
clientRoute: EmailVerificationRoute,
getEmailContentFn: import { getVerificationEmailContent } from "@src/server/auth/email.js",
},
passwordReset: {
clientRoute: PasswordResetRoute,
getEmailContentFn: import { getPasswordResetEmailContent } from "@src/server/auth/email.js",
},
userSignupFields: import { getEmailUserFields } from "@src/server/auth/setUsername.js",
},
email: {
fromField: {
name: "Meeting Reminders",
email: "hey@meeting-reminders.com"
},
emailVerification: {
clientRoute: EmailVerificationRoute,
getEmailContentFn: import { getVerificationEmailContent } from "@src/server/auth/email.js",
},
passwordReset: {
clientRoute: PasswordResetRoute,
getEmailContentFn: import { getPasswordResetEmailContent } from "@src/server/auth/email.js",
},
userSignupFields: import { getEmailUserFields } from "@src/server/auth/setUsername.js",
},
But it generated plenty of errors.
kapa.ai
kapa.ai•18d ago
Hi @Ricardo Batista. 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 isn't a direct way to disable email login in Wasp. However, there is a discussion on a Github issue about making the generated login and signup pages optional or flexible. The proposed options include providing a boolean property in the auth declaration to turn off automatic generation of auth pages or generating pages and actions and letting the user use the pages if they want by declaring a route to them in the .wasp file. This feature might not be available yet, but it's worth keeping an eye on the issue for updates. If you're getting errors after commenting out the email block, it's likely because other parts of your application are still expecting it to be there. You might need to remove or modify these parts as well. For now, if you want to use only Google signup, you can focus on the google block in your auth configuration and make sure it's correctly set up. Here's an example of how to do it:
app myApp {
wasp: {
version: "^0.13.0"
},
title: "My App",
auth: {
userEntity: User,
methods: {
google: {
userSignupFields: import { userSignupFields } from "@src/auth/google.js"
}
},
onAuthFailedRedirectTo: "/login"
},
}
app myApp {
wasp: {
version: "^0.13.0"
},
title: "My App",
auth: {
userEntity: User,
methods: {
google: {
userSignupFields: import { userSignupFields } from "@src/auth/google.js"
}
},
onAuthFailedRedirectTo: "/login"
},
}
Remember to implement the imported function as well:
export const userSignupFields = {
isSignupComplete: () => false,
}
export const userSignupFields = {
isSignupComplete: () => false,
}
Please refer to the Wasp documentation (https://wasp-lang.dev/docs/auth/social-auth/overview#2-overriding-the-default-behavior) for more details. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Ricardo Batista, 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?
Ricardo Batista
Ricardo Batista•18d ago
@kapa.ai but that doesn't stop the email auth from showing up. How can I remove it?
kapa.ai
kapa.ai•18d ago
Let me check the knowledge base for you. One moment! :books: ---------------------- I'm sorry for the confusion, but based on the provided knowledge sources, there isn't a direct way to remove or disable the email authentication method in Wasp. The Wasp framework currently doesn't provide an out-of-the-box way to disable specific authentication methods once they've been enabled. The knowledge sources do not provide a solution to your specific problem. I would recommend reaching out to the Wasp community or checking the Wasp documentation (https://wasp-lang.dev/docs) for further assistance. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Ricardo Batista, 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?
miho
miho•18d ago
The bot is mistaken 🙂 as soon as you comment out the email method it should be gone! What kind of errors do you get? Maybe you need to delete some email related files and imports e.g. somewhere in the app you used something email specific which no longer exists
Ricardo Batista
Ricardo Batista•18d ago
True indeed. By commenting there are 5-6 imports that need to be removed, I removed the files altogether. Thanks @miho !
Want results from more Discord servers?
Add your server
More Posts
Do I have a way to use useLazyQuery ?My app filters some data. I need to be able to refetch whenever the user clicks on "search" with theWhere to see migration files?I have messed up one migration (because I had to delete my local code), and now I don't know where tFile upload size limitI'm trying to implement max file upload size to the s3 bucket. I've handled the front-end but I worrAuthis there a sample bypass to login the auth while in developmentQuick Start not working?I'm following this tutorial: https://wasp-lang.dev/docs/quick-start After opening my terminal and rI cant see ubunbtu on my Linux sub system folderI just started with this programming stuff and i wanted to try my app with this new ai called magegpIs it possible to separate client and server wasp build?each time I update stuff on client, and want to push to netlify, I need to run wasp build, but it refly.io deployment errorI tried to deploy to fly.io, and I set DATABASE_URL, and I tested it can connect successfully with dfront end developers demand in job marketCan anyone please tell me about the demand of a beginner level front end developer in job market nowPassing Context for Dependency InjectionIs there a standard pattern for passing the context object for database interaction to functions? WGetting Updates to the Open SaaS Template (not working?)I am following the guide in [Getting Started](https://docs.opensaas.sh/start/getting-started/), howeCant find app and blog in my folder but it says wasp already installed.Hi everyone, ive installed Wasp but i cant find where the app and blog folder is at. It keeps says NsignupWhen defining action in main file If i dont want to use entity as i dont want to store in the db. CaStoring additional data in sessionHi everyone 😉 I'm exploring a possibility to develop my new project in WASP which looks really awesOAuth Login Error with Google Credentials in Local EnvironmentHello everyone, I need a bit of help. In my local environment, I've correctly set up the GOOGLE_CLIETypescript not validating included relationThis is likely due to my inexperience with typescript, but I've been trying to access a related propcustomize auth UI button shapeHi, I see there is an appearance to customize the color of the auth UI, how can I change the shape oStarlight missing trailing slashStarlight's sidebar doesn't include a trailing slash ("/") at the end of the URL, leading to a 301 rSuggested cookie consent plugin?I have been trying a few cookie consent plugins for React, but none seem to work well with Wasp (e.gpaypal & other payment gateway integrationI am curious if there is guideline/template for integration of other payment gateway apart from stri