[CLI] Ethereum auth setup updates#3337
Conversation
The failing tests say that However, it looks like this file is being mocked ??? https://github.com/redwoodjs/redwood/blob/306c26ee558d4a03bb7e234828817763dbf5b4f6/packages/cli/src/lib/test.js#L27 |
|
Thanks for this one @pi0neerpat I'd like to get this into the next release! Assigned "breaking" and "docs" labels — want to make sure we suggest people update their existing code per the new templates. Also, please let me know if you think the Auth docs will need updating or not. I've looped in @dthyresson All looks good to me at a glance. I'm just not the resident expert on Auth API and templates. |
Agreed, thank you!
Another set of eyes would be helpful for:l
|
|
@pi0neerpat I'm not seeing the file It looks like you'll need to mock the API side paths in the two failing test files (authHandler.test.js and addAuthConfigToApp.test.js). E.g: to |
| service: path.join(getPaths().api.services, '/ethereumAuth/ethereumAuth.js'), | ||
| graphql: path.join(getPaths().api.graphql, 'ethereumAuth.sdl.js'), |
There was a problem hiding this comment.
Hmm, this feels out of place here. Understood you'll need service and graphql path included, but hardcoding these for Ethereum Auth here probably isn't the right approach. Maybe modify files() so you can pass config from providers/etherum.js that effectively adds to the returned files? Something like this would be more extensible for any/all auth providers.
Any other (better) thoughts about this @dthyresson?
There was a problem hiding this comment.
Oh you weren't supposed to find that 🙃
There was a problem hiding this comment.
So, the need here is to have the setup command:
- add SDL
- add a service
?
|
@pi0neerpat just a heads up that I'm planning to create a v0.37 release branch tomorrow. No pressure, but if you have time to resolve this PR by tomorrow it would be a great one to include. And/or just communicate with me about your timing. Thanks! |
|
Ngmi by tomorrow, so don't worry about me for this release!
…On Mon, Sep 20, 2021, 1:25 PM David Price ***@***.***> wrote:
@pi0neerpat <https://github.com/pi0neerpat> just a heads up that I'm
planning to create a v0.37 release branch tomorrow. No pressure, but if you
have time to resolve this PR by tomorrow it would be a great one to
include. And/or just communicate with me about your timing.
Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3337 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIPY5QYWMYM346TCPWLAK6LUC6DB5ANCNFSM5DKGFCWQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
| @@ -0,0 +1,96 @@ | |||
| import { AuthenticationError } from '@redwoodjs/api' | |||
There was a problem hiding this comment.
Have you considered instead of having this be a service with SDL, it is just a serverless function?
Does it need to be exposed to as GraphQL?
There was a problem hiding this comment.
Yeah you bring up a good point. Now that I've learned how to use dbAuth, I'm thinking that I should completely re-haul the ETH Auth to piggyback on dbAuth. This is a lot, so I may need to move this to draft and come back to it
There was a problem hiding this comment.
Sounds good. We can move to draft and definitely review when you've had some time to rethink if need.
|
Closing until reworked provider. |

Changes
yarn rw setup auth ethereumto bring things up to speed with Redwood v0.36services/ethereumAuth/ethereumAuth.jsandgraphql/ethereumAuth.sdl, which removes the need to copy/paste these file from the installation instructions.TODO
templates/ethereum.functions.template.js. I have no idea why its getting created?!