Comments (5)
An additional feature will be to have access to current Auth.state. This way it is simpler for the developer to hide/display custom components based on that.
from amplify-ui.
Hello @xavierraffin, thank you for your detailed feature request! Looking over this now. This is something we want to support in our @next
release as well!
Totally agreed on difficulty with reading and writing authState. Adding this to our new Authenticator GA milestone to track this.
On the new Authenticator, we'll provide mechanisms that provide you access to readonly
authState and helpers that'll enable you to transition between different authStates. For React, it'll likely be a hook:
const { authState, toForgotPassword } = useAuthenticator();
which is a one-liner instead of onAuthUIStateChange callback that we used to have!
Edit: didn't read your thread well! Apologies.
from amplify-ui.
You can try or track the progress of our next authenticator on
- https://ui.docs.amplify.aws/ui/getting-started/installation?platform=react
- https://ui.docs.amplify.aws/ui/components/authenticator?platform=react
Please let us know if you have any suggestions or feedbacks!
from amplify-ui.
Hi @xavierraffin, apologies to keep you waiting. With @aws-amplify/[email protected]
, you are now able to add custom forgot password link in the footer through https://ui.docs.amplify.aws/components/authenticator#headers--footers without Hub
workarounds. I'll be closing this issue as that use case is now supported.
That said though, I understand that the premise of this issue is not resolved (particularly read authState part). We would like to understand this use case a little bit better before we commit to a globally available hook. Can you please try out the new authenticator, and open a new feature request with what could be improved for which use case? Thanks in advance!
from amplify-ui.
Hi, came back to the issue! We just exposed useAuthenticator
that you can use outside the authenticator to access or transition (ie. write) auth state. Please take a look and we gladly accept any feedbacks 🙏
Documentation is here: https://ui.docs.amplify.aws/components/authenticator#useauthenticator-hook
from amplify-ui.
Related Issues (20)
- Session Not Found HOT 15
- Authenticator error message overflows if message is long HOT 2
- Issue with `withAuthenticator` hook integration in Next.js app HOT 3
- Ionic Chatbot UI [missing-page] HOT 2
- Ability to specify auth flow to trigger user migration events HOT 2
- Reset Password by Email not showing correct translations HOT 3
- SelectField SVG accessibility
- Liveness - Your account isn't authorized to call this operation HOT 11
- Pass className prop through to StorageImage HOT 1
- Could not resolve all files for configuration ':amazon-cognito-identity-js:debugCompileClasspath'. HOT 1
- Vite React - Component does not work correctly in mobile browsers, especially Google browsers HOT 8
- Liveness - Users getting timeout error as soon as they try to load HOT 13
- Undefined ('S3Object') Error HOT 12
- Customizable Visual Feedback Colors in Liveness Component HOT 3
- Autocomplete footer not allowing onClick HOT 2
- [Face Liveness] Cannot complete check due to server issue. Try again HOT 13
- Authenticator with only social sign in (hide regular sign in fields) HOT 2
- React: Set unique id to each authenticator step's button HOT 3
- Unrecognizable lambda output - When user Create an account HOT 1
- ResizeObserver loop when navigating in the Authenticator component HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amplify-ui.