redwoodjs / redwoodjs-com-archive

Public website for RedwoodJS
https://redwoodjs.com
129 stars 156 forks source link

Update Auth Doc: Clarify what a "Custom" provider is (and is not) #740

Open thedavidprice opened 3 years ago

thedavidprice commented 3 years ago

continuing discussion from https://github.com/redwoodjs/redwood/issues/1585 originally posted by @dthyresson

To Do

Update the doc to clarify per info below

Background

See the following Community topic post from "edjiang":

"Looks like we’re not able to generate custom providers anymore?"

image

While the docs do seem to indicate that one can generate a custom auth provider:

image

It is not supported because:

https://github.com/redwoodjs/redwood/blob/c46033a5229bdeba5d2549466e416400a22ba2b4/packages/cli/src/commands/generate/auth/auth.js#L35

and there is no "custom" template.

While it may be relatively easy to setup the web side, the api side is more complicated with the changes needed for graphql and the additional auth lib.

The custom generator could (and should) still add these to the api side, and stub on the web side.

dthyresson commented 3 years ago

Be sure to see: https://github.com/redwoodjs/redwood/pull/3414

I will be adding some better info on custom for release 0.37 and an example of how to use the token (not decoded) to wither find an account or other case (say API key).