themsaid / wink

A Laravel-based publishing platform
MIT License
2.9k stars 383 forks source link

[support] - how to programmatically log in? #200

Closed beck24 closed 5 years ago

beck24 commented 5 years ago

It seems the ability to have the User class manage the blog has already been discussed, I'm wondering if it's possible to programmatically log in as a WinkAuthor?

I've created a WinkAuthor for my User, I just want to create a simple button that takes them to the blog admin and logs them in automagically.

I tried Auth::login($winkAuthor) but that was unsuccessful. Any suggestions?

beck24 commented 5 years ago

I figured it out.

In case anyone else is searching for it you need to use the Wink auth guard first

auth('wink')->login($winkAuthor)
skino2019 commented 3 years ago

i might need to ask you some questions on this lol. im trying to do the same thing with Laravel Fortify