W
Wasp-lang3mo ago
Arnab

Remove email sign in/ up

Is there a way to remove the email sign in/up. I'm only using Google Auth
3 Replies
kapa.ai
kapa.ai3mo ago
Hi @Arnab. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Yes, you can customize the authentication methods in Wasp. If you only want to use Google Auth, you can specify this in your main.wasp file. Here is an example:
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"
},
}
In this example, only Google Auth is specified under methods. This means that only Google Auth will be used for authentication, and the email sign in/up will not be generated. However, please note that there is an open issue on the Wasp GitHub discussing the possibility of making the generated login and signup pages optional or more flexible. This suggests that currently, you cannot completely turn off the automatic generation of these pages. But you can choose not to use them in your application by not declaring routes to them in your .wasp file (source (https://github.com/wasp-lang/wasp/issues/147)). For more information on how to set up Google Auth, you can refer to the Wasp documentation (https://wasp-lang.dev/docs/auth/social-auth/overview#2-overriding-the-default-behavior). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Arnab, 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?
Vinny (@Wasp)
Vinny (@Wasp)3mo ago
Hey @Arnab you're using Open SaaS, right? if so, then you also need to remove the routes/pages in main.wasp, and als the related files that they're importing
Arnab
Arnab3mo ago
That’s right. Yup got it! Thank you
Want results from more Discord servers?
Add your server