Is there a way of resetting a user's password in Realm Database - ios

I would like to be able to reset a user's password, in the case they have forgotten it. Is this possible using the Realm framework. As a natural extension to this problem, would is there a way of changing the user's password upon entering (correctly) their current password.
I am creating an iOS application in Swift.
Thanks in advance!

If you are using Realm Mobile Platform, we provide SyncUser.changePassword(_:, completion:) and SyncUser.changePassword(_:, forUserID:, completion:) APIs.
https://realm.io/docs/swift/latest/#changing-passwords
We have not provided a convenient way to achieve "Forgot password?" feature currently, so you need implement such UI and workflow yourself.
is there a way of changing the user's password upon entering (correctly) their current password.
You need to try logging in to see if the current password is correct.

Related

How to get the password of the current user - Swift Firebase

I want to know, is there a way to retrieve the current user's password? Or just check if his password != "acertainvalue". I'm speaking when the current user is connected through Firebase authentification. Thank you
There is no way to get the current password from the Firebase Authentication API as that would be a big security risk.
I'd also in general recommend against persisting the user's password as plaintext anywhere yourself, for the exact same reason.
If you need to check the user input against a specific value in your code, you should do that check right after you get the input from the UI - and before passing input on to Firebase.

How to show autofill suggestion without managed shared credentials? React native IOS

I have this task that need to show the suggested username & password on my app.
something like this that I found [credits to this site]
https://brainsandbeards.com/blog/quick-change-that-helps-ios-users-sign-in-quicker
or something like this
Other way to autofill
But every time I press the 'password' on the top of the keyboard it always goes directly to the list of keychains and not giving the option like the above image showing a suggested account or choose other passwords.
I even followed this documentation:
https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_associated-domains
even use an 'alternate-mode' on the associated domain.
I suspect that the webserver we're using is not managed shared credentials enabled server?
Is there a possibility to do this without associated-domain capability?
Thanks in advance!

Proper way to handle user accounts with CloudKit

I'm creating an iOS app that uses CloudKit and I want my users to log in to the application. Ideally they will just need a username and password. If the password is forgotten they'll need a way to reset it so I'll have to store their email as well.
My question is, What is the best practice for user account information, i.e. username, email, and password?
Is it as simple as storing the username publicly, then the email and password privately on the CloudKit user?
The nice thing about working with CloudKit on iOS is that authentication is built in. You don't have to worry about usernames and passwords.
When a user connects to your iCloud container via your app, they will only have access to what is stored in their own private database. They can also see what you give them access to in the public database.
If you can elaborate a bit more of what you are try to do, I can try and give some more guidance. But in short, you don't need to worry about authentication.

Implementing password reset method on iPhone and Android apps?

I'm having trouble finding a way to provide users a reset password method for my apps.
Unlike this question, I don't wan't to manage it locally, instead I prefer to validate the user by some sort of connection to my server.
Should I validate the user via e-mail? By sending him a link containing a key like:
http://www.myweb.com/inc/mobile/activate.php?email=pepe%40hotmail.com&key=252b6a8e98b8109cda4f53500a419b62
I'm not sure how to make that work without using any webView.
Or maybe the best approach is to e-mail them a link to a website in which they can reset their password (like in Path).
Please, can someone point me in the right direction?
Any help would be appreciated.
The safest approach is to have your app contact the site, and have your site send an email to the user with a password reset link. It seems fairly common to provide a GUI in your app telling the user to check his email for the password reset instructions.
That way, if an impostor gets access to the app, he may not have access to the email or may not know the credentials for your site.
Your GUI could be done natively or with a webView. I am not sure why you are trying to avoid a webView in any event, but it is not required.

User's credential store at sqlite or using webservices for Ipad App?

I need to add sign in and sign up option so i am little confuse that whether I'll use Sqlite to store user's credential or using web service(PHP)?
if anyone knows better option except above both operation then please guide me.
you are storing a username and password you could use the Keychain.
To use Keychain import "Security/Security.h".
Apple has an example of adding and retrieving a username and password in their documentation. The example methods
- (void)mySetObject:(id)inObject forKey:(id)key;
- (id)myObjectForKey:(id)key;
- (void)resetKeychainItem;
will enable you to persist and retrieve your user credentials almost without modifying the example code.
Calling webservices that require authentication, provide username and password directly as parameters in the URL using NSURLConnection

Resources