Astra-Labs / Aureus

An open-source design system for non-profits to quickly develop user safety critical applications.
https://withaureus.org/
Other
13 stars 1 forks source link

Integrate recordFailedLogInAttempt() into Sign In View for easier SP integration #65

Open codingiswhyicry opened 1 year ago

codingiswhyicry commented 1 year ago

currently, there is functions within the Safety class to write a failed log-in attempt for the user to find in the SafetyPlanLogInAudit screen (which should be added to the settings screen if that safety plan option is enabled). it doesn't directly interface with the storage layer, nor does it actively tell the developer the settings of the user so that's why it's directly available within the Safety class (because the settings are checked within the private storage layer).

in the sign in view right now, we take in TextEditingControllers as widget params and functions for execution on sign in with the implied idea that a user will check the text edit controllers on sign in for a password match. I would have liked for the password checking to happen on the SignInView's side, which just isn't possible with the way that APIs work and save user information.

I'm not sure how to integrate linking failed log in attempts directly into the template, which I would prefer to do. with any safety plan items, I would prefer direct integration into aureus as opposed to relying on devs to integrate in their codebase. we can document this as a thing, but I don't know if anyone would actually read the docs.

not sure how to solve this, but am posting here in case someone in the future has ideas / I become a better dev and can find a work around to this.

codingiswhyicry commented 1 year ago

dfkdfkl I meant a developer would check the text editors I'm sorry it's 1am

codingiswhyicry commented 1 year ago

potentially let's force this to be a mixin so that users must adopt specific methods related to the safety plan. this seems like the best path forward to FORCE developers to adopt some parts of it, without being too heavily handed and taking away dev autonomy.