How to create a strapi code for reset password - strapi

I need to send an email to the users whenever I create a new user from my backoffice. So I should access to the util that creates the strapi code for resetting passwords when I do it with the built in plugin.
Basically I create a new user -> send welcome email to the new user and link to set a new password -> User clicks on the link and redirects him to the password reset page.
Any idea on how create this code in a custom API?
I use react + strapi v4.1.5

Related

How to Send an Email Verification for a Created User?

I'm trying to use Laravel 5.7's new email verification feature. Let's say I'm logged in as Admin inside the admin panel and I want to:
Create a random user via admin panel.
Send an email verification to that created user's email.
How can I accomplish this with the new Laravel 5.7 email verification feature?
The built in verification scaffolding provides a notification to do this. You just need to ensure that the user's verified_at is set to null and then
use Iluminate\Auth\Notifications\VerifyEmail;
$user->notify(new VerifyEmail);
This will resend a new email with a signed URL.

How to get and store registration details from user for later login in XAML Windows store apps

Hello am a newbie with windows store app so am devoloping an app that requires a user to register before he can login so am trying to figure out how to get user inputs on registration form mayb store it a database or sometging so that he can login with the exact same registered details!
Xaml windows store app
To get the users' registration details, you could retrieve the credentials from the Credential Locker after you have a reference to the PasswordVault object.
You can implement PasswordVault.RetrieveAll() method to retrieve all the user has supplied for your app.
You might refer to the sample Retrieving user credentials:
"where we have stored the resource name globally in an app and we log the user on automatically if we find a credential for them. If we find multiple credentials for the same user, we ask the user to select a default credential to use when logging on".
To store these details, you need to use PasswordVault.Add() method to pass the username and password to a PasswordCredential object:
var vault = new Windows.Security.Credentials.PasswordVault();
vault.Add(new Windows.Security.Credentials.PasswordCredential(
"My App", username, password));
For more details, please see Windows.Security.Credentials.
If you want to store them into a database, you can use SQLite to save and get the data. To learn how to use SQLite on the Universal Windows Platform , please refer to this blog written by #Diederik Krols.

How to use the password reset form for logged in user in Laravel 5.2?

I am trying to use the auth\passwords\reset blade from the auth() scaffold package to let a user change their password once they are logged in. At the moment, this page does not show up as it's not added to the proper middleware route as discussed here
I'm trying to develop a simple form with a password and confirm password field, which the user could use to change their password to set a new password.

How to create stormpath user without password?

Some users of our application are admins. We want give them a capability to create new users. We think about the following flow:
Admin goes to "Users" page and clicks a "create a new user" button and fill new user's name and email address.
That new user retrieves an email with acknowledge that a user was created in our application.
The user clicks a link from email body and proceeds to "Set password" page and specify his password.
Is it possible to achieve such flow with angular + express? Is there any other possible flows which can be achieved?
You can create an invite-based flow, but you'll have to do some custom work with our libraries.
You'll need to work with the Stormpath Client and Stormpath Application directly, these are provided by the Stormpath Node SDK. Inside of your Express middleware, retrieve the client with:
var stormpathClient = req.app.get('stormpathClient')
and the application with:
var stormpathApplication = req.app.get('stormpathApplication`)
On the application, use stormpathApplication.createAccount() to create the user. When you pass the new account data, set the password to something that is very long, random, and un-guessable. If your Stormpath directory has email verification enabled, the user will get an invite email. That email should link them into your Angular application, to a custom view which will read the email verification token from the URL and post it to a custom middleware on your server. This middleware will need to use stormpathClient.verifyAccountEmail() to verify the token.
Then you can collect a new password for the user, and save it by setting req.user.password='new password', then calling req.user.save().
Hope this helps! I work at Stormpath and I am a maintainer of these libraries :)

Magento enterprise sending password in email not reset link

i am using magento enterprise right now when user click on reset password fill email address our magento send password to user. but what i am trying to add reset link in email. i try to edit
{{store url="customer/account/resetpassword/"_query_id=$customer.id _query_token=$customer.rp_token}}
http://yoursite.com/customer/account/resetpassword/?id={{var customer.id}}&token={{var customer.token}}
{{store url="customer/account/resetpassword/" _query_id=$customer.id _query_token=$customer.token}}
three of them not working customer token not coming in email i try with rp_tocken , token both has same problem token missing in email.
and when i click on link shows me 404..
while i was working on this functionality then i saw " rp_token " not exist then what i did i create rp_token,ro_date attribute under customer then once user request for password reset then i just add values in these attributes then send email link.. here is full module :
http://www.sandeepsingh.us/product/magento-ajax-resetpassword-module/
download this module please read or install carefully if you are not able to run this left me know..

Resources