redwoodjs-com-archive
redwoodjs-com-archive copied to clipboard
Update Auth Doc: Clarify what a "Custom" provider is (and is not)
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?"
While the docs do seem to indicate that one can generate a custom auth provider:
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.
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).