amazon-cognito

AWS Cognito Authorization code grant flow without using the hosted UI

旧城冷巷雨未停 提交于 2020-01-22 14:03:07
问题 Using AWS's Cognito without the hosted UI, given a username, and password I would like to receive an Authorization code grant without using the hosted ui. Is this possible? I am writing my own sign up, log in forms but cannot seem to find documentation on this subject. Currently I can use AWS.CognitoIdentityServiceProvider and the initiateAuth function to exchange username password for tokens, but I do not want to return those tokens in the redirect URL, I would rather return an authorization

Publishing Cognito authentication state changes to environmentObject on background thread

风格不统一 提交于 2020-01-15 10:05:06
问题 I am working on a SwiftUI app that utilizes AWS Amplify/Cognito for its authentication. I have created a session object that keeps track of whether a user is authenticated. This session object is an ObservableObject that is loaded into environmentObject and accessed by different views. It has a @Published property called isLoggedIn. Within this session object, a listener has been created to capture changes in authentication state which update the value of isLoggedIn. The code compiles and

Publishing Cognito authentication state changes to environmentObject on background thread

。_饼干妹妹 提交于 2020-01-15 10:00:08
问题 I am working on a SwiftUI app that utilizes AWS Amplify/Cognito for its authentication. I have created a session object that keeps track of whether a user is authenticated. This session object is an ObservableObject that is loaded into environmentObject and accessed by different views. It has a @Published property called isLoggedIn. Within this session object, a listener has been created to capture changes in authentication state which update the value of isLoggedIn. The code compiles and

Continue with custom auth flow after NEW_PASSWORD_REQUIRED challenge is answered in AWS Cognito

好久不见. 提交于 2020-01-15 08:53:07
问题 A new user is created by an admin. They need to reset their initial password on first login. We have the Cognito app client configured to only allow custom authentication flow (CUSTOM_AUTH_FLOW_ONLY). But when the user resets their password, the auth flow ends and they get the id-, access- and refresh-token immediately, none of the custom challenges are issued. How can I steer the flow to continue with my custom challenge flow, instead of issuing the tokens? It would also work if the tokens

Unauthenticated user to authenticated user on AWS Cognito

萝らか妹 提交于 2020-01-15 07:37:55
问题 My code is here: code Reposted because I wanted to ask a more direct question. How do I switch between unauthenticated user and authenticated? My unauthenticated seems cached and I've used these methods: [credentialsProvider clearCredentials]; [credentialsProvider clearKeychain]; before the rest of my api code and it still doesn't work. Any help is appreciated Note: I know it's not working because I make a call using lambda right after I switch up my configuration/credentials provider and

How can I use cognito to create user accounts, but a different service for verification?

你离开我真会死。 提交于 2020-01-15 05:42:28
问题 I am building an app that will be using Plivo or Twilio for user interaction and input. I wanted to use AWS Cognito for user management, but for verification, they say a user must verify email or phone number. I wanted to have the user interaction and verification come from the same phone number, so is there a way to set this up in Node.js somehow, where a text to a Plivo/Twilio number reroutes to AWS Cognito for verification? 回答1: You can leverage the custom auth flow to achieve this. Take a

Angular AWS Amplify authenticator extrra fields

♀尐吖头ヾ 提交于 2020-01-15 05:07:07
问题 I'm trying to use the AWS Amplify with Angular for authentication with Cognito, the problem that I'm facing is, when I call the component: <amplify-authenticator></amplify-authenticator> It does not come with all the fields for Sign up, that I marked as required in Cognito, so it always return a error like: Missing field Name, for example So my question is, if they don't return some of the fields that I marked as required, how can I add it, without having to change the source of the component

AWS cognito user pool server side flow with spring boot

非 Y 不嫁゛ 提交于 2020-01-14 06:50:20
问题 I want to implement AWS Cognito server side flow with spring boot. I don't quite understand what the flow should be. Should I use spring oauth along with it ? Requirement is something like this. As an admin create user and give access to these created users to use my API from API Gateway (Let's ignore API Gateway part and say we just need access token from cognito for now) Here is what I think should happen if I use AWS cognito with spring oauth2 user hits localhost:8000/oauth/token - with

AWS Lambda response in Java for Cognito

我只是一个虾纸丫 提交于 2020-01-14 05:45:26
问题 How can I write an "AWS Lambda response" in Java so that Cognito is happy? Something like this is passed to the lambda function { "version": number, "triggerSource": "string", "region": AWSRegion, "userPoolId": "string", "callerContext": { "awsSdkVersion": "string", "clientId": "string" }, "request": { "userAttributes": { "string": "string", .... } }, "response": {} } Now I need to make the response in Java.. and send back to Cognito. At the moment Cognito throws an

AWS Cognito completeNewPasswordChallenge calls onFailure method but the user is confirmed in AWS Console

匆匆过客 提交于 2020-01-13 11:04:47
问题 I'm using AWS Cognito Javascript SDK in a react application. I have a user that was created in the AWS Console by an admin, and when the user is logged in for the first time they have to reset their password. I go through the newPasswordRequired flow, and when I call the completeNewPasswordChallenge function with the parameters, the onFailure callback is ran. When I log the error I get, {code: "UnknownError", message: "Unknown error"} . However, when I check the AWS Console, the user in the