Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
仅使用 auth 包(不是aws-sdk)如何使用我的凭据配置 Amplify?
aws-sdk
const { Auth, // configure? } = require('@aws-amplify/auth')
类上有一个configure方法Auth。例子:
configure
Auth
Auth.configure({ region: import.meta.env.VITE_AWS_REGION, userPoolId: import.meta.env.VITE_USER_POOL_ID, userPoolWebClientId: import.meta.env.VITE_USER_POOL_CLIENT_ID, });
参考:https ://github.com/aws-amplify/amplify-js/blob/6882c5e6e8f1bff2206ff0de74cebbcf87efd622/packages/auth/src/Auth.ts#L141