如何编辑由AWS Amplify的认证服务实现的默认“登录”和“创建帐户”页面?

huangapple go评论54阅读模式
英文:

How do I edit the default 'Sign In' and 'Create Account' pages that are implemented by AWS Amplify's authentication service?

问题

我已创建了一个Amplify-React应用程序并实现了AWS Amplify的身份验证服务。这会创建默认的“登录”和“创建帐户”页面。我想通过更改文本字体或按钮颜色等方式编辑这些页面的外观。有人知道我该如何做吗?

我还没有尝试任何方法,因为我不知道从哪里开始。

英文:

I've created an Amplify-React app and implemented AWS Amplify's own authentication service. This creates default 'Sign In' and 'Create Account' pages. I'd like to edit the look of those pages by perhaps changing the text font or the colour of buttons etc. Does anyone know how I'd do this?

I haven't tried anything yet as I don't know where to start.

答案1

得分: 0

Amplify允许您轻松自定义它。
Follow the documentation here: https://ui.docs.amplify.aws/react/connected-components/authenticator/customization

英文:

I think Amplify allows you to customize it easily.
Follow the documentation here: https://ui.docs.amplify.aws/react/connected-components/authenticator/customization

答案2

得分: 0

你可以使用这个文档来构建你自己的前端解决方案。

import { Auth } from 'aws-amplify';

async function signIn() {
    try {
        const user = await Auth.signIn(username, password);
    } catch (error) {
        console.log('error signing in', error);
    }
}

使用React来控制状态,并传入这些数值。

这里有一个教程可以供你参考。

英文:

You can use this documentation and build your own front-end solution.

import { Auth } from 'aws-amplify';

async function signIn() {
    try {
        const user = await Auth.signIn(username, password);
    } catch (error) {
        console.log('error signing in', error);
    }
}

Use react to control state, and pass in the values.

Here is a tutorial you can follow.

huangapple
  • 本文由 发表于 2023年3月7日 19:31:54
  • 转载请务必保留本文链接:https://go.coder-hub.com/75661423.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定