Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating A New Account #1

Open
aaronksaunders opened this issue Dec 3, 2021 · 2 comments
Open

Creating A New Account #1

aaronksaunders opened this issue Dec 3, 2021 · 2 comments

Comments

@aaronksaunders
Copy link
Owner

below you can see in my code, that there is sessionData and there is an access_token returned

GET /create-account?_data=routes%2Fcreate-account 200 - - 6.599 ms
sessionData {
  access_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJhdXRoZW50aWNhdGVkIiwiZXhwIjoxNjM4NTU2NzEzLCJzdWIiOiJjMTIxNDY0NC1jMzMxLTQ5NDQtYjc0Ny00MjcyYWU3MTgzMmIiLCJlbWFpbCI6ImFhcm9uLTEwMUBtYWlsLmNvbSIsInBob25lIjoiIiwiYXBwX21ldGFkYXRhIjp7InByb3ZpZGVyIjoiZW1haWwiLCJwcm92aWRlcnMiOlsiZW1haWwiXX0sInVzZXJfbWV0YWRhdGEiOnt9LCJyb2xlIjoiYXV0aGVudGljYXRlZCJ9.mo6jWc3MwfxpBiwdqIWI36bxRpBaUhhmqzpJzvEJ7Ik',
  token_type: 'bearer',
  expires_in: 3600,
  refresh_token: 'jf_1kNHTpQi5I9iJfuNJYw',
  user: {
    id: 'c1214644-c331-4944-b747-4272ae71832b',
    aud: 'authenticated',
    role: 'authenticated',
    email: '[email protected]',
    email_confirmed_at: '2021-12-03T17:38:33.643824359Z',
    phone: '',
    last_sign_in_at: '2021-12-03T17:38:33.64715745Z',
    app_metadata: { provider: 'email', providers: [Array] },
    user_metadata: {},
    identities: [ [Object] ],
    created_at: '2021-12-03T17:38:33.638812Z',
    updated_at: '2021-12-03T17:38:33.648941Z'
  },
  expires_at: 1638556714
}
user {
  id: 'c1214644-c331-4944-b747-4272ae71832b',
  aud: 'authenticated',
  role: 'authenticated',
  email: '[email protected]',
  email_confirmed_at: '2021-12-03T17:38:33.643824359Z',
  phone: '',
  last_sign_in_at: '2021-12-03T17:38:33.64715745Z',
  app_metadata: { provider: 'email', providers: [ 'email' ] },
  user_metadata: {},
  identities: [
    {
      id: 'c1214644-c331-4944-b747-4272ae71832b',
      user_id: 'c1214644-c331-4944-b747-4272ae71832b',
      identity_data: [Object],
      provider: 'email',
      last_sign_in_at: '2021-12-03T17:38:33.641370738Z',
      created_at: '2021-12-03T17:38:33.641411Z',
      updated_at: '2021-12-03T17:38:33.641411Z'
    }
  ],
  created_at: '2021-12-03T17:38:33.638812Z',
  updated_at: '2021-12-03T17:38:33.648941Z'
}
POST /create-account?_data=routes%2Fcreate-account 204 - - 432.850 ms
GET /?_data=routes%2Findex 200 - - 160.066 ms
@trey
Copy link

trey commented Dec 3, 2021

Thanks for taking a look and confirming. I don't know what was going on for me before. I have now created a fresh Remix site, added the pages and utilities from this repo, and got it working there too.

Thanks again! You have made my week by sharing this. I've been banging my head against the wall for days trying to figure out a workflow like this.

@G9000
Copy link

G9000 commented Apr 30, 2022

For those who follow this code,

Mine return null too then I check it is because Enable email confirmations are on. Don't forget to disable it in case you want to follow this setup.

Thanks, @aaronksaunders for the neat video

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants