I recently was on twitter and needed to reset my password. When click send to send your email a reset password, it routes you to another url with a button saying "Go to my email"
I am using AngularJs and want to be able to use this feature of having user click a button to go to their email client! That is so cool! I cannot find any examples or documentation on how to do this. Any ideas on how you could send a user to their specific email client AngularJs?
The only way I could see of achieving this would be writing a controller that would have some information like this: "if email ends in #gmail.com = route to 'https://www.gmail.com'"
You have two options: 1. Create a link, as you mention, to the appropriate client based on the email address, or 2. Use a mailto link, which will open the user's default email client. So, it really depends on your use case to choose the appropriate method.
In terms of the link to the email, you can either create a map of email address and urls:
{
'gmail.com': 'https://www.gmail.com',
...
}
Or, you could probably get away with splitting the string at the # and just tacking www. to the front of it to serve as a link.
Other than that, the browser gives you no other method.
Related
I have an MVC asp.net web application using bootstrap and angularjs that requires the user to log in. On occasion, we will send the user an email with links to detail info on the site. When we click the link in the email, it sends the user to login, but then does not go to the detail.
Link in email http://mywebapp.com/filedetail#!/filedetail/1234
I was going to use the Request.RawUrl, but for some reason, it only contains: http://mywebapp.com/filedetail
If I use http://mywebapp.com/filedetail/filedetail/1234, rawurl has the data, but then trying to use the link if the user is already logged in, the web page contains no formatting. It appears the the "#!" is not compatible with the request data.
Not sure how to solve this.
Any help would be appreciated...
I was hoping to direct a user to the Password Reset Page of the Auth0 Universal Login Page, I assumed Auth0 would handle the required functionality, in a similar way we use
const { loginWithRedirect } = useAuth0()
I know I can call loginWithRedirect() and then click on forgot password, however that takes 2 clicks and I want my Change Password button to immediately redirect me. Is there no trick like loginWithRedirect({ action: 'signup' })} which redirects me instantly to the signup form?
I know about sending a POST call to the Authentication API, I want to do this via the Universal Login Page.
I have come to the conclusion that this still wasn't possible.
There's a property screen_hint that we can pass to
auth0.loginWithRedirect({ screen_hint: "signup" })
So it would have been great to be able to do this:
auth0.loginWithRedirect({ screen_hint: "password-reset" })
This question has already been asked here
And the answer was
Unfortunately this is not currently possible. The only options are to open with the login page or the sign-up page. This is a limitation with the Universal Login Page rather than this SDK, it simply doesn't allow for opening other screens as the default for the moment.
In the end, what we did was to provide a link, which when clicked on, would make a call to the API.
Not sure if it's useful, but I'll explain how we deal with password reset (using Auth0) at the company I work for, which might push you in a slightly different direction.
First thing to understand is; there's 2 places where a user might need/want to reset their password.
When they're signing in with their email/username and password, but have forgotten their password.
They want to proactively change their password after they've already signed in.
In both scenarios we simply call an Auth0 authentication API to Change Password, which sends a change password email to the user. Note: for the #1 we might need to capture the email/username (that is, if we don't yet have this information), as this is required for the Change Password request. For #2 we should already have this information either in ID token or via the /userinfo endpoint (see here).
The change password email (which can be templated in Auth0) has a link to the Universal Login "Password Reset" widget. You can use the default widget, which offers some basic styling/branding. Alternatively you can fully customize this with your own SPA e.g. see below:
The default (non branded/styled) password reset widget looks like this:
My native language isn't supported by firebase's auth templates, so I was wondering if it'd be possible to modify the only modifiable template, which is the password reset template, to also send verification and email address change emails?
That is not possible. You can't modify the template content to be a verification email template when the link will always be the password reset link. You can just file a feature request for your language support. Reach out to the Firebase official support team about this.
I can't figure out how can I get email address from twitter. I've been using this as example - https://github.com/sahat/satellizer/tree/master/examples/server/node. I've also seen that it's possible to get email from twitter's oauth - https://dev.twitter.com/rest/reference/get/account/verify_credentials. Thanks
The example server doesn't appear to get the email in the twitter case.
And the documentation link explains how to request
Requesting a user’s email address requires your application to be
whitelisted by Twitter. To request access, please use this form.
Once whitelisted, the “Request email addresses from users” checkbox
will be available under your app permissions on apps.twitter.com.
Privacy Policy URL and Terms of Service URL fields will also be
available under settings which are required for email access. If
enabled, users will be informed via the oauth/authorize dialog that
your app can access their email address.
"Given that you have to go through all the hoops to get whitelisted by Twitter in order to access user's email, it is it not part of the example code. If you really need to get user's email, you may have to do that outside Satellizer's auth flow." - sahat (owner of satellizer)
I have an angular based app and I want to open another URL on a new tab from my app and automate a login. For example my app is www.myapp.com, and it will open www.anotherurl.com/login. Let's say I have both the username and password for www.anotherurl.com/login.
How can I automate the login by populating the form and do the login?
Is this something we can achieve from the client side? or this needs a server side implementation?
Or is this is even possible?
Update:
I have no control over www.anotherurl.com/login by the way. This is just another way of saying I want to open gmail.com with credentials and automate a login instead of me typing the username and password, and pushing the login button myself.
Thanks in advance for your thoughts.
you can send them along as query parameters, but if you are not using https then they will be sent in the clear. for example:
https://www.anotherurl.com/login?user=bob&pass=secret
then in your controller, if these query params are present then call a login method
also worth mentioning that even if its over https the password will be in the user's browser history and thats probably not a good thing either.