Secondary Auth Collection prevents first collection from working

default discord avatar
work
7 months ago
10

Hey, i'm trying to make a new auth collection so that on our frontend we can support SSO, the exisiting user collection is used for the admin dashboard only. but for some reason the new collection i've added seems to overwrite the default user collection and forces me to make a new account to gain access.



I'm trying to connect Discord with passportjs using the strategies but it prevents the admin dashboard from even loading just gets stuck on a white screen with no errors



So quick run down


1) Existing user collection should only work on Admin Dashboard


2) New Collection should not affect the original user collection


3) New collection configures with SSO's using Passport Strategies


4) New collection works with SSO and doesn't make a user/pass as it's not required.



Errors i'm getting


1) Discord Passport plugin requires utils and querystring but webpack has issues with it, setting to false on fallback causes no pages to load


2) DisableLocalStrategy prevents the exisiting user collection from working on admin panel and just shows payload logo


3) New collection overrides the existing collection


4) if a strategy is present on new collection, nothing loads



Got exisitng admin collection working



needed to set the user collection in the config



think i'm having same issue now that was previously mentioned


All routes are being protected by the strategy causing cors error



still having issue if theres a strategy in use it only shows white page on admin panel

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.