Skip to content

Commit

Permalink
Consider callback options when sending magiclink
Browse files Browse the repository at this point in the history
  • Loading branch information
gnandretta committed Sep 26, 2015
1 parent df39304 commit e7ec405
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1736,6 +1736,16 @@ Auth0.prototype.startPasswordless = function (options, callback) {
if (options.authParams) {
data.authParams = options.authParams;
}

if (this._shouldRedirect && !options.send || options.send === "link") {
if (!data.authParams) {
data.authParams = {};
}

data.authParams.redirect_uri = this._callbackURL;
data.authParams.response_type = this._callbackOnLocationHash ? "token" : "code";
}

if (options.send) {
data.send = options.send;
}
Expand Down

0 comments on commit e7ec405

Please sign in to comment.