how do I show the users email on my frontend.
Hi kapa how can i show the users email on my frontend. Also for my opensaas project how can i extend the register field to have more things related to b2b.
getEmail helper function provided by Wasp. This function returns the user's email or null if the user doesn't have an email auth identity. Here's an example of how you can use it:SignupForm component by passing in the additionalFields prop. This prop can be either a list of extra fields or a render function. Here's an example:auth.methods.{authMethod}.userSignupFields field in your main.wasp file. Here's an example:

getEmailSignupFormadditionalFieldsauth.methods.{authMethod}.userSignupFieldsimport { getEmail } from 'wasp/auth'
const MainPage = ({ user }) => {
const email = getEmail(user)
// Now you can use the email variable in your JSX
// ...
} import {
SignupForm,
FormError,
FormInput,
FormItemGroup,
FormLabel,
} from 'wasp/client/auth'
export const SignupPage = () => {
return (
<SignupForm
additionalFields={[
{
name: 'address',
label: 'Address',
type: 'input',
validations: {
required: 'Address is required',
},
},
// Add more fields as needed
]}
/>
)
} app crudTesting {
// ...
auth: {
userEntity: User,
methods: {
usernameAndPassword: {
userSignupFields: import { userSignupFields } from "@src/auth/signup",
},
},
onAuthFailedRedirectTo: "/login",
},
}