Next-auth: Use next-auth with decoupled API?

Created on 21 Jan 2019  路  3Comments  路  Source: nextauthjs/next-auth

Hi there, wonderful library!

Apologies if this isn't a great place for this question, however I've pored over articles/SO/tutorials for awhile now and thought I'd give it a shot here!

I was wondering if you had any suggestions on implementing Next-Auth with a decoupled API. In my repo I've got an 'api' folder which contains my Rails API for handling user authentication, but I know this library uses Express/Passport for user authentication. On my frontend I'm using Next.js and modeled my login after this repo.

Thank you!

question

All 3 comments

I'm in the same situation, I wonder if there's a workaround

I think you can always leverage this https://github.com/iaincollins/next-auth/blob/master/example/next-auth.functions.js

@ntgussoni I'd been looking at that but was scared off with how it's setup with MongoDB currently. Maybe I'll give it a shot with connecting it to my Postgres app. Mind sharing if you come up with something?

Hi there! Thank you, sorry I wasn't able to reply in a timely way.

Hopefully this should be addressed with announcement of version 2.0 which no longer uses Express or Passport.js and will support multiple databases out of the box (including Postgres), if you have need of the package again.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iaincollins picture iaincollins  路  3Comments

benoror picture benoror  路  3Comments

eatrocks picture eatrocks  路  3Comments

alex-cory picture alex-cory  路  3Comments

alephart picture alephart  路  3Comments