-
Notifications
You must be signed in to change notification settings - Fork 995
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Magic.Link added as provider to @redwoodjs/auth #562
Conversation
The build and lint tests also fail as by the error of |
The crooks of the implementation is done. 🚀 Thank you to @peterp for all the help! You can follow how i have implemented it into the invoice app here Main files - Things to noteOn the API side i though it was best that in that the magic-admin client was loaded in the developers project instead of inside of redwood, how does that effect everything?
the token is just handed back to the client to decode inside of Auth.lib As seen Below
Current Problems
|
Wooh! This is cool, and I think the way that you've done it makes a lot of sense. We don't really want to bundle esoteric decoding libraries with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great. I would love to have the type definitions working, but otherwise I think this can be merged!
I made a suggestion about the name of the provider.
changed naming from magicLinks to magic.link Co-authored-by: Peter Pistorius <peter.pistorius@gmail.com>
changed naming from magicLinks to magic.link Co-authored-by: Peter Pistorius <peter.pistorius@gmail.com>
changed naming from magicLinks to magic.link Co-authored-by: Peter Pistorius <peter.pistorius@gmail.com>
changed naming from magicLinks to magic.link Co-authored-by: Peter Pistorius <peter.pistorius@gmail.com>
* refs/heads/pp-auth-magic-links: Linted code
I agree with the name change, will work on the other bits tonight i have opened a comment on magics SDK asking for advice with the typing. |
Hey, just wanted to mention that I think we've solved your problem in You should be able to type the instance just as you would expect now: import { Magic } from 'magic-sdk';
let foo: Magic; // foo will equal `InstanceType<typeof Magic>`
foo = new Magic(...); // ✨ works! Please let me know if other blockers arise! |
@smithki AMAZING! Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Causes one error on the logout.
@smithki it looks like everything is typed correctly. But it looks like we are still having the build errors coming from react-native types inside of react-native-webview.
|
I'll pull your branch locally and see if I can figure out why. This is the first I've seen such an issue 🤔 |
@burnsy -- I think I've solved the issue in Here's more context around what the issue boils down to: We support web and React Native environments, but we have no way of signalling to TypeScript that we don't want RN typings to pollute the web bundle. It's very difficult to separate the definitions without resorting to hacks. Honestly it's sort of mind-boggling that it's not a baked-in feature of TypeScript, but at least there's a relevant issue open: microsoft/TypeScript#18588 |
… into HEAD * 'pp-auth-magic-links' of https://github.com/Burnsy/redwood: (22 commits) create option default using check for API and Web existing Make `db` optional. Clean up messages. Add tests. Add more type information for sides. Remove "args" package. Fix types. Fix docs. Update readme docs. Install deps. Add missing declarations. Refactor the dev-server. Add node and browser path types. Run yarn lint --fix Check for QUERY export before ignoring a Cell file with default export Allow non-cell files name end with Cell Add IP address to the Lambda event's requestContext Update packages/web/src/graphql/withCell.js Update packages/web/src/graphql/withCell.js Update packages/web/src/graphql/withCell.js ...
I believe thats everything! I have wrote some documentation on how to integrate it. |
Thanks for this @burnsy, you legend! Did you get some stickers? |
@peterp Yes, I would love to see something similar to Gatsby! Redwood definitely needs a small e-commerce store. I would love to get a redwood T-shirt or something! |
Hello,
I am currently have added Magic.Link as a provider following there SDK outlined here.
I have not tested it yet as I have an issue #561 finding
redwood-tools