Hey guys, I've a question regarding phone_number
update after registration but before confirmation (JavaScript library).
I'm using an SMS based MFA and after calling Auth.signUp
and sending the confirmation code I want to allow to change the phone_number
. For example if the user mistypes his number.
But if I call signUp()
it says the email/number (whatever is set to be unique) is already registered.
An Auth.updateUserAttributes
also fails because the user isn't yet logged in nor confirmed.
Is there any way to deal with attribute changes before confirmation and without an logged in user?
Thanks for ya help <3
aws amplify create-branch ...
(branch gets added, but the build is not triggered, I still see one front-end environment for the app)aws amplify start-job ...
(nothing changes on AWS console UI)aws amplify list-jobs ...
(says job has finished, but I see no new env anyway)Hello, I was wondering if someone could help with an issue with the AWS Amplify React integration?
I have successfully implemented a custom auth flow using Amplify however I am currently receiving an error (but get expected functionality) with the Auth.forgotPasswordSubmit(username, code, password)
method. After receiving a OTP code and having the users email from a forgot password form, on "apparently" successful calls I get an Exception thrown:
UserLambdaValidationException, PostConfirmation failed with error 2021-11-26T00:26:01.659Z 4359469e-b42e-478c-bf39-0b78a9186cb1 Task timed out after 3.00 seconds.
If I go back to login, the new password is correctly authenticated though - as if the change password process was successful and not unsuccessful like the response implies.
Any ideas why I am getting this error? Is it something to do with using an email
as a username
for this method? How would I get the users Cognito username
from their email prior to them signing in?
Thanks,
Jamie
try {
let email = this.state.email;
let code = this.state.code;
let newPassword = this.state.password;
console.log('PasswordResetScreen: _onPressChangeButton() [Forgot Password]', email, code, newPassword);
await Auth.forgotPasswordSubmit(email, code, newPassword);
}
catch (error) {
if (error.code === 'CodeMismatchException') {
this.refPagerView.current.setPage(0);
this.setState({ error: 'Invalid verification code' });
}
this.setState({ error: error.message });
console.warn(error.code, error.message);
}
All day today when pushing to hooked up repo, the 'build' pipeline keeps failing. From the logs it looks like the backend build phase executes but doesn't do anything (the logs just show a start and completed logs with nothing in between), which I "think" is causing the frontend preBuild phase to fail as it cannot find amplify command.
It did manage to run once, which was just me adding some comments in the backend build phase in my amplify.yaml. Running that worked, but even re-running that exact same build failed with the above issue.
My amplify.yaml file is the stock standard, with the only exception is that I'm using yarn and not npm. Nothing was changed and has been working as is for awhile now, except for today
Hey! I'm running into an issue where if I configure the cookieStorage parameters for Amplify Auth I get a No Current User error.
If I remove my configurations I can successfully log in.
Here's my config
import { Amplify, Auth } from "aws-amplify";
Amplify.configure({
Auth: {
region: process.env.AWS_REGION,
userPoolId: process.env.COGNITO_USER_POOL_ID,
userPoolWebClientId: process.env.COGNITO_POOL_CLIENT_ID,
authenticationFlowType: "USER_PASSWORD_AUTH",
cookieStorage: {
domain: process.env.DOMAIN_URL, ( this is set to "mywebsite.herokuapp.com" right now)
expires: 30,
path: "/",
},
},
});
Any suggestions?
Additional context: My front end is a svelte app, deployed on heroku
When I run the project on localHost I can store the cookie with no problem.
import type { NextPage } from 'next';
import Head from 'next/head';
import { useRouter } from 'next/router';
import { getDevblogBySlug } from '@api/queries';
import { Amplify, API } from 'aws-amplify';
import { useEffect } from 'react';
Amplify.configure({
ssr: true,
Auth: {
region: process.env.NEXT_PUBLIC_COGNITO_REGION,
userPoolId: process.env.NEXT_PUBLIC_COGNITO_USER_POOL_ID,
identityPoolId: process.env.NEXT_PUBLIC_COGNITO_IDENTITY_POOL_ID,
userPoolWebClientId: process.env.NEXT_PUBLIC_COGNITO_APP_CLIENT_ID,
},
aws_appsync_graphqlEndpoint: process.env.NEXT_PUBLIC_APPSYNC_URL,
aws_appsync_region: process.env.NEXT_PUBLIC_APPSYNC_REGION,
});
const DevblogPage: NextPage = ({}) => {
const router = useRouter();
const { devblogSlug } = router.query;
useEffect(() => {
API.graphql({ query: getDevblogBySlug, variables: { slug: devblogSlug }, authMode: 'AWS_IAM' })
.then(console.log)
.catch(console.error);
});
return (
<>
<Head>
<title>DevblogPage</title>
<meta name="description" content="Generated by create next app" />
</Head>
<div>devblogSlug: {devblogSlug}</div>
</>
);
};
runtime parameter of nodejs10.x is no longer supported for creating or updating AWS Lambda functions.
when running amplify push
. I have the latest node and npm installed, and I've run npm install -g @aws-amplify/cli
several times, but nothing changes. Anyone have suggestions?
File at path '~/amplify/#current-cloud-backend/amplify-meta.json' does not exist
const providers = API.graphql({ query: listProviders, variables: { limit: 20 }});
getting a response stating Validation error of type UnknownType: Unknown type TableProvidersFilterInput"
. This is auto generated from appsync, and failing on importing the filter. Any pointers how to resolve this? Tried import { TableStringFilterInput, TableProvidersFilterInput } from './API';
export const listProviders = /* GraphQL */ `
query ListProviders(
$filter: TableProvidersFilterInput
$limit: Int
$nextToken: String
) {
listProviders( filter: $filter, limit: $limit, nextToken: $nextToken) {
items {
id
name
}
nextToken
}
}
`;