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

Integration with Laravel Socialite and Laravel Fortify (Login) #175

Closed
thedanmwangi opened this issue Apr 16, 2022 · 2 comments
Closed

Integration with Laravel Socialite and Laravel Fortify (Login) #175

thedanmwangi opened this issue Apr 16, 2022 · 2 comments
Assignees

Comments

@thedanmwangi
Copy link

Have encountered an issue related to this.

I am using both Laravel Socialite and Laravel Fortify to authenticate my users.

Registration in Laravel Fortify has integrated perfectly with this Package, but Login has (if I can call it) a loop hole.
When I attempt to Login a user whose Mobile is not Verified, the browser returns a "too many redirects" error.

The same case happens to Laravel Socialite. Socialite does not provide the system with a user's mobile number, I have to fetch it directly from the user using a form. Adding a form that fetches this info and sending it to the route "mobile.verify" does not do anything. It directs to Home and then returns the 'too many redirects" error.

Perhaps:

  1. If the package could have a fall back route for when a user is not verified it would fix the too many redirects issue.
  2. If the package could point out a dedicated view for which users can manually enter their mobile numbers and send it to a specific controller, one that Validates then triggers the event(new Registered($user)); Event, it would work for even users logged in via Laravel Socialite.

Kindly, let me know your thoughts.

Originally posted by @thedanmwangi in #27 (comment)

@50bhan
Copy link
Collaborator

50bhan commented Apr 19, 2022

@thedanmwangi I can't say that I've realized what the exact problem is here. But I can say that you can implement your logic in whatever way you want. Please see the documentation: https://github.com/mohammad-fouladgar/laravel-mobile-verification#customize-routes-and-controller
You can customize the verify method which is the method behind the mobile.verify route.

@thedanmwangi
Copy link
Author

The problem comes when logging in a user who has not been verified. Laravel returns a "Too many redirects" error.

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