Add auto-registration mechanism #9

Closed
opened 2023-02-19 17:23:49 -06:00 by carltibule · 2 comments
carltibule commented 2023-02-19 17:23:49 -06:00 (Migrated from github.com)

Add a way to hit POST /v1/Users/ endpoint upon login, to register the user locally if they have not been yet

Add a way to hit POST /v1/Users/ endpoint upon login, to register the user locally if they have not been yet
carltibule commented 2023-02-23 00:08:44 -06:00 (Migrated from github.com)

There's currently an issue with calling the POST endpoint from React App, in that an exception can be thrown when multiple calls are thrown to the API at the same time, and registration happens simultaneously. It violates the unique auth0id constraint.

Another approach will be to try to hit it via Auth0 Post user registration workflow, but it will have to come after the dev environment setup.

References:
https://community.auth0.com/t/how-to-get-a-users-id-token-inside-of-the-post-user-registration-auth0-action/67338
https://community.auth0.com/t/how-do-i-call-my-api-from-a-rule/41309

There's currently an issue with calling the POST endpoint from React App, in that an exception can be thrown when multiple calls are thrown to the API at the same time, and registration happens simultaneously. It violates the unique auth0id constraint. Another approach will be to try to hit it via Auth0 Post user registration workflow, but it will have to come after the dev environment setup. References: https://community.auth0.com/t/how-to-get-a-users-id-token-inside-of-the-post-user-registration-auth0-action/67338 https://community.auth0.com/t/how-do-i-call-my-api-from-a-rule/41309
carltibule commented 2023-03-03 00:20:47 -06:00 (Migrated from github.com)

New approach to be taken:

  • Find out how to detect duplicate request to an endpoint and block it there
  • As last stop-gap measure, swallow exceptions to Saving new User and log accordingly
  • Will be restoring call to Register endpoint when navigating to /Bookmarks and Home page
New approach to be taken: - Find out how to detect duplicate request to an endpoint and block it there - As last stop-gap measure, swallow exceptions to Saving new User and log accordingly - Will be restoring call to Register endpoint when navigating to /Bookmarks and Home page
cjtibule added this to the YABA project 2024-04-07 14:11:00 -05:00
cjtibule self-assigned this 2024-04-07 14:11:02 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cjtibule/YABA#9
No description provided.