Skip to content

Magic links don't work when Outlook "safe links" are enabled #629

@eirikur-grid

Description

@eirikur-grid

Magic links don't work when Outlook "safe links" are enabled

Description

Outlook will rewrite email links to direct them towards https://*.safelinks.protection.outlook.com/ with the original url encoded as a query parameter, when a feature named "safe links" is enabled. In our testing, this appears to break magic links.

Using the standard email templates, we got a rather cryptic error message, stating that the redirect_uri was missing. By tweaking the email template to include the client_id and redirect_uri, we get a different error, stating that the magic link is invalid or expired.

Steps to reproduce

Steps to reproduce the behavior:

  1. Create an email account on outlook.com
  2. Register a user with the @outlook.com (or @hotmail.com) email address
  3. Ask for a magic link to be delivered to the outlook email address
  4. Click the link

Expected behavior

The magic link works and the user is authenticated

Screenshots

Screenshot 2020-05-14 at 14 39 53

Screenshot 2020-05-14 at 16 43 57

Screenshot 2020-05-14 at 16 41 42

Platform

(Please complete the following information)

  • Device: MacBook Pro
  • OS: macos
  • Browser: Chrome 81
  • FusionAuth version: 1.15.5

Additional context

The "safe-links" feature can be turned off (see the last screenshot). If we do, then the magic links work as expected.

We have two hypothesis as to what might be causing this:
a) The passwordless code is somehow distorted as it is URL path encoded and decoded by the safe-links mechanism.
b) The safe-links mechanism makes a GET request to the magic link, thus using the code and making it invalid for future requests.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions