How to change AWS Cognito app name from Google Login? - amazon-cognito

The name of my app inside Google Login using AWS Cognito is "amazoncognito.com". How can I change this? (Javascript sdk)
Ex:

create a custom domain for your user pool. https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-add-custom-domain.html

Related

AWS amplify authentication, enable only sign in - not sign up

From all the great tutorials I looked for of how to add an auth module for a react app in amplify. The only type of module I see is a complete feature of sign in + sign up.
What I'm trying to achieve is:
Set up a custom Cognito user pool and add users to the pool manually.
Add custom sign-in/login UI + code to a react amplify app.
Disable anyone but me to add new users to the Cognito user pool manually.
The website I'm working on is an internal website and I don't want anyone to be able to sign up via AppSync or the react client.
Please help :)
This won't be very difficult - you simply don't implement the front-end functionality to add a new user. Then, in your Cognito user pool config, there is an option User sign ups allowed? which you would set to Only administrators can create users.
Edit: Also, consider using the hosted UI, it may save you some front-end work.

Delete the user pool added by AWS Amplify

I'm developing a React Native app and using AWS Amplify with Amazon Cognito for authentication. I've added the authentication for the app using Amplify CLI (amplify add auth). The problem is I need to add/remove the required attributes for the sign up, but those cannot be changed after the user pool is created.
My question is how can I delete the currently added user pool using the CLI, and making sure that the changes are reflected in aws-exports.js?
I figured it out. As mentioned here, it's not in amplify-cli docs, but you can remove a single category (in this case auth) like this:
amplify remove <category>
So, in this case, it would be
amplify remove auth
And, then
amplify push
aws cognito-idp delete-user-pool --user-pool-id youruserpoolid

how to host static website with cognito and s3 only

I have a bunch of html/css/js files. I have one index.html file. I would like to create some predefined users in cognito so that they can browse my website in s3. I don't want to create a login page by myself. I want only s3 and cognito, nothing else. is there any way to achieve this?
You will have to do a lot of your coding to achieve something like this. You can use the inbuilt cognito GUI to take care of registration and login but after that you need to write some code to use the generated tokens to grant user access to s3 hosted resorces which you will have to fetch and show on a webpage.
So, no you cannot do this simply with s3 and cognito.

Aws Cognito with google federated identity: Logs me in with the last user

Problem:
I am using Aws Cognito using google as external federated identity for auth of my application:
problem is it logs me in with the last user when having only one signed in google account. Basically it seem its simply not able to logout the user completely.
Heres what is happening :
I am logged into google with e.g user a#gmail.com
I login into cognito via the external federated identity use the above email and login. All iz well.
I now logout and want to login into cognito using 'b#gmail.com', now say I created the account using another browser and never used the current browser, so browser does not know about this.(In short I am logged into just one gmail account in this browser.)
When I try to signin I am shown the option to 'Signin with Google' but it never presents me the account selection screen and directly logs me in.
I am using the screen cognito shows at https://mydomain.auth.auth.us-east-1.amazoncognito.com/login
Using Prompt:
I see that google itself has a way to force the user to select an account using the 'prompt' : select_account option. But I see no way to specify this anywhere in cognito.
Question :
- Anyone have any fix / workaround to above problem? I need a way to 'always' show the account selection so that he can choose or use a different account.
Did you try the logout endpoint from cognito ?
- Yes, This is happening even after I send the user to the logout endpoint of cognito, which is probably supposed to logout the user.

Persisting unauthenticated user on AWS Cognito and AWS Amplify with React Native

I'm trying to implement AWS-Amplify in a React Native app so that events can be sent to Pinpoint for analytics. A user doesn't need to be signed in to use the app, so they would be unauthenticated with Cognito.
I am noticing that the identity of the unauthenticated user doesn't seem to persist, so when I close or uninstall the app, a new identity id is generated when I launch the app. The docs suggest that this should be cached, but it seems the cache is clearing out when using AWS Amplify.
Is there a way to set or reuse an identity id for a returning unauthenticated user on AWS-Amplify or Cognito so new identity ids don't get assigned ?
I looked through amazon-cognito-identity-js to see if there was a way to do this with an unauthenticated user and wasn't able to find what I am describing: see here.
I'm new to AWS Amplify/Cognito/Pinpoint in general, so any thoughts or suggestions to do something similar would be greatly appreciated!
This is a known issue in the AWS Amplify and should have been fixed in the latest version.