mpociot / teamwork

User to Team associations with invitation system for the Laravel 5 Framework
MIT License
1.07k stars 170 forks source link

Using Teamwork with Multi-Auth #80

Closed KimKJDesigns closed 4 years ago

KimKJDesigns commented 7 years ago

I've been testing Teamwork with a single login perfectly fine, actually once configured properly, it's amazing. However, now I want to implement it with a multi-auth using guards, ie wholesaler and retailer.

This is seemingly more difficult the deeper I go dive into the teamwork coding. Before I pull everything apart to get it working, has anyone had any experience in implementing multi-auth teams with teamwork. Maybe I've overlooked something simple.

Perhaps a feature suggestion, a flag to name a guard, which will add prefixes to slugs and add guards to auth calls. Possibly adding associated files in a specific guard folder too.

okaufmann commented 4 years ago

As of Teamwork uses auth() to get the currently logged in user it will use the default auth guard set in config/auth.php. Therefore it won't be compatible...

If you still need this, feel free to create a PR on this.