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

How to remove user from authn? #84

Closed
qqqqqz opened this issue Nov 28, 2018 · 1 comment
Closed

How to remove user from authn? #84

qqqqqz opened this issue Nov 28, 2018 · 1 comment

Comments

@qqqqqz
Copy link

qqqqqz commented Nov 28, 2018

For example i have created the user on register from frontend- when i do- i first create in auth from client-> then send the info with account_id to server and create user in app database with its info- but > what if the server side fails- i should some how remove the user from auth. Is there things for such cases?

@cainlevy
Copy link
Member

Excellent question. I've taken two approaches.

  1. Cleanup - in the backend, detect when a user has an AuthN account and no matching user record. This is an incomplete signup, so use the AuthN admin API in your backend integration (Ruby? Go?) to delete the account.

  2. Recover - detect the same incomplete situation but instead offer a form to finish signing up.

The second approach is nice if you have plans to integrate OAuth in the future, because you can reuse the same "finish creating your account" form when a user returns from Google/Facebook/Twitter.

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

2 participants