Hey not obvious, but you can add your own route handlers in the src/api/functions directory. Lastly, here’s an example posted on our forum about setting up Redwood with a different auth provider, Firebase: How to: Authentication with RedwoodJSĭoes anyone else have some recommended next steps or examples to help here? Adding google sign-in to your web app - a react example:.Looking for examples of integrating Google Auth with React and/or GraphQL, here are some examples I found that seemed of interest: (Note: Redwood is effectively 2 primary components 1) a GraphQL API using Apollo and 2) a React front-end with some special sauce ). In the meantime, I have some ideas for you, although I have no experience setting up Google Auth for a React application. But auth is in progress, and you can expect integration from Redwood directly in the months ahead. Hi Excited you’re trying out Redwood! Things are still (very) early here, so we don’t have an official auth package yet. What am i missing here, or do you have any idea how I can implement this in redwood? Does this have to do with the fact that theres a proxy server? Note that for Google auth to work, I must use an href or link to the backend url that handles the google auth, it cannot be an axios or ajax call. I tried creating another file in functions and route to it, still no luck. I have a file called graphql.js inside of my functions folder so that i can access graphql at localhost//:8911/graphql but when i tried to add the app.get() inside of graphql.js and handle the button click from the frontend to trigger google auth, it says theres no route to handle that. However, since moving to redwood, I have no clue how to do this. ![]() ![]() When adding google authentication I was able to direct the client on a button click to a certain backend url like backend-url/auth/google and inside of my backend in my index.js i had a simple app.get() that handled that route and then i use a google passportjs strategy that then displays the third party google auth screen to the client and then upon a successful login/signup, they are redirected to a call back route in the backend which then redirects the client to a url in the browser. So I am moving from my previous application where I had a separate Client and Server Project.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |