Skip to content

Working basic cognito auth client - #5765

Closed
ManavDia wants to merge 3 commits into
redwoodjs:mainfrom
ManavDia:feature/cognito-auth-client
Closed

ManavDia wants to merge 3 commits into
redwoodjs:mainfrom
ManavDia:feature/cognito-auth-client

Conversation

@ManavDia

Copy link
Copy Markdown

Hi Redwood guys.
I've implemented Cognito as an auth provider for Redwood. I've tested it working on a work project that relies on Cognito (Via patching), to use it simply instantiate a CognitoUserPool from amazon-cognito-identity-js as the client and pass it to the AuthProvider. The basic functions of Redwood AuthClient are implemented. additional functionality such as OTP or MFA can be accessed by accessing the client object on your useAuth() hook:

const { client } =  useAuth()

client.getCurrentUser()
client.changePassword()
client.sendMFACode()

Full functionality that can be accessed is available to read here: https://www.npmjs.com/package/amazon-cognito-identity-js

@netlify

netlify Bot commented Jun 15, 2022 •

Copy link
Copy Markdown

✅ Deploy Preview for redwoodjs-docs canceled.

Name Link
🔨 Latest commit b545d10
🔍 Latest deploy log https://app.netlify.com/sites/redwoodjs-docs/deploys/62aa0a48042a410008f30d83

@callingmedic911 callingmedic911 added the release:feature This PR introduces a new feature label Jun 15, 2022
@callingmedic911

Copy link
Copy Markdown
Contributor

Thanks for the PR @ManavDia! Just wanted to let you know there's already a PR in progress for Cognito, hoping we can all collaborate together. #5745

@Leon-Sam Leon-Sam mentioned this pull request Jun 16, 2022
3 of 4 tasks
@Tobbe

Tobbe commented Dec 17, 2023

Copy link
Copy Markdown
Contributor

Closing this one in favor of #5745

@Tobbe Tobbe closed this Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:feature This PR introduces a new feature

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants