grant icon indicating copy to clipboard operation
grant copied to clipboard

How to override handler for inner path?

Open nestauth opened this issue 1 year ago • 1 comments
trafficstars

I have the following authentication routes:

/connect/:provider
/connect/:provider/callback

There are also two routes for linking a social account within a profile (here I added an object with the key link in the overrides):

/connect/:provider/link
/connect/:provider/link/callback

Everything is fine with this, but I need one more route for unlinking:

/connect/:provider/unlink - POST

But when I add this route, my handler doesn't trigger, and instead, the grant handler gets triggered (a request is made to the provider).

nestauth avatar Aug 11 '24 08:08 nestauth

Not sure which framework are you using with Grant, but in general, if you mount your routes before Grant then they will take precedence.

simov avatar Aug 11 '24 12:08 simov