Comments (5)
@UrbanViking - I'm not sure that I understand what you're suggesting here. Are you saying that this template should be renamed?
from ng-token-auth.
Please correct if I understood the flow of RequestPasswordReset and ChangePassword
User opens RequestPasswordReset template, enter email and then submit button that trigger the RequestPasswordReset action, that sends the user an email with password reset instructions. Within that email there is a link to change password.
The user click this link and should now see a ChangePassword template with the input fields password and password_confirmation.
But the link within the RequestPasswordReset template has the link to the the RequestPasswordReset template.
Said with other words, shouldn't the RequestPasswordReset template have a link to ChangePassword template?
from ng-token-auth.
What do you mean by the terms "RequestPasswordReset template" and "ChangePassword template"?
from ng-token-auth.
The mailer that is sent from the RequestPasswordReset
https://github.com/lynndylanhurley/devise_token_auth/blob/master/app/views/devise/mailer/reset_password_instructions.html.erb has this link:
<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token, config: message['client-config'].to_s, redirect_url: message['redirect-url'].to_s) %></p>
When I click that link in the mail, I get the same template from where I requested the password reset. Shouldn't the link give me the template where I can enter a password and submit my new password?
This is how the mailer in Devise looks like
<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
The difference is the redirect_url
as you can see. It looks that I don't get the edit_password_url
for devise_token_auth/passwords#update
but I am redirected to edit_password_url
for devise_token_auth/passwords#create
.
from ng-token-auth.
You can redirect to any URL that you want. For example:
angular.module('myApp', ['ng-token-auth'])
.config(function($authProvider) {
$authProvider.configure({
apiUrl: '/api',
confirmationSuccessUrl: 'http://example.com/account-create-success',
passwordResetSuccessUrl: 'http://example.com/password-change-success'
});
});
This will cause the link in the confirmation email to redirect to http://example.com/account-create-success
, and the link in the password reset confirmation email to redirect to http://example.com/password-change-success
.
This is explained in the docs.
from ng-token-auth.
Related Issues (20)
- $auth.validateUser() for different user types
- auth:password-reset-confirm-success never seems to be broadcast HOT 1
- Refreshing multiple times causes token failure/loss HOT 2
- Make a new release HOT 7
- Info on Support of this token for Angualr js 1.x HOT 2
- submitLogin unauthorize user
- how to broadcast 'auth:logout-success' if i logout using my own method HOT 1
- config is undefined HOT 1
- Quota Exceeded errors from setItem() when running on Heroku HOT 1
- submitRegistration without Confirmable?
- Unable to persist session after refresh HOT 6
- Live demo doesn't send registration emails HOT 1
- $auth.validateUser undefined in safari. HOT 1
- ng-token-auth depends on Express 3.x
- Project status HOT 1
- Unhandled rejection on failed login, even with catch()
- token headers not being stored
- package supports angular 6? HOT 2
- postMessage handler doesn't verify origin
- Create new release for package.json fix
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 ng-token-auth.