E
E
Erouech2020-09-25 15:21:25
Laravel
Erouech, 2020-09-25 15:21:25

Authorization by laravel link?

Good afternoon,
I use laravel-ui for authorization out of the box.
The following problem appeared - when a user registers, he receives a letter saying "Confirm". If he confirms from the phone (not from the device from which he registered or re-sent a request for mail verification), then he will be redirected to the /login page, and will not authorize.
How can I authorize a user using this link? (I use everything out of the box, I did not rewrite anything)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Max, 2020-09-25
@maximrabotaet

Generate a link in a letter with a token in the url, when registering to the user in the database, add signup_token (the token itself) and signup
_token_expired (the lifetime of the token), on the confirmation page, find the user by the token from the url and check the relevance of the token, if everything is fine, authorize

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question