Sign Up Email Confirmation

Check the edit I solved it :slight_smile:

Follow up question here Logging in with a token instead of a username and password

image
Hello, firstName and lastName are null in such example, how to correct put the fields?

Hello!

I’ll answer you as soon as possible.

Lada Kokotova | Technical Support Engineer

Hello, how to correct implement it on auth0 actions? Because in the topic was sent example for userCreate, please provide for userSignUpWithPassword.

Hey SeeFirst. Where is this event.user data coming from? I’m not sure here where the user is being authenticated, and therefore unable to determine whether that data should be available.

Also, are you using the userCreate mutation or a userSignupWithToken or userSignupWithPassword?

Thanks

I have used it from your guide - Sign Up Email Confirmation, I want to add more fields not only email, how can I do it?
image

So a userCreate mutation only created the user record, it doesn’t have the information required to tie that user to any Authentication Profile or auth provider. Thus no email is sent.

Try using the userSignupWithPassword mutation. It will allow you to specify the authProfileId.

Hello, email is sent, I have another issue, above you threw an example of userCreate mutation, but with this mutation only the email field is added to db, how to create this mutation so that I can add firstName, lastName, work_phone, company? May be I need to use userSignupWithPassword mutation, if yes can you provide an example of mutation?

Hi Lada. Do you have a direct link for useful examples on git hub?

@vyacheslav.solomin could you send a link, please?

Lada Kokotova | Technical Support Engineer

Hey @SeeFirst

I just ran this mutation:

mutation {
  userCreate(data: {
    email: "john@james.com"
    firstName: "John"
    lastName: "James"
  }) {
    id
    email
    firstName
    lastName
  }
}

and got back the response:

So the mutation is working. Are you sure that you’re passing it the right data or fields?

Here is sample of my request:
image
Is it correct? Cusom action in auth0.

In my example email is sent to db but firstName, lastName and other fields are not sent, what to do?

Can you please share:

  1. The actual Mutation string for your CREATE_USER_MUTATION variable.
  2. Confirm that event.user.given_name is actually accessing the intended value.

Here is my mutation:
image
I don’t really know if event.user.given_name is actually accessing the intended value, can you please share how can I check it?

I want to put correct fields in to 8base db

Add a console.log() statement to your code in the function and console out the user data.

console.log("Event data: ", JSON.stringify(event))
console.log("User data: ", JSON.stringify(event.user))

Let us know what’s coming through.

Event user result - { email: "jct38192@zwoho.com", tenant: “seefirst”, user_id: “auth0|612682a02c1cc90071080292”, app_metadata: {}, user_metadata: {}, email_verified: false, phone_verified: false }
My steps: I want firstly regitster user in auth0 then in 8base, for this I use auth0 action custom flow but it returns no values, what I need to do?

Hello!

It’s almost done. Sorry for the long wait. There’re a lot of urgent tasks. Our developers are doing their best.

Lada Kokotova | Technical Support Engineer

Hello!

We’ve done! Link:

In this example:

 // AUTH0_DOMAIN
// AUTH0_CLIENT_ID
// AUTH0_CLIENT_SECRET
// AUTH0_CONNECTION (Username-Password-Authentication)

You need to add these variables in 8base env vars.

This example has a restriction so in this case, you need to turn off in auth0 the register on the universal login page. Otherwise, users who have registered through auth0 - universal login will not create in the 8base base. Don’t forget to configure auth0 and add all the variables that I mentioned before.

Lada Kokotova | Technical Support Engineer