Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Add support for idSite email verification #594

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/config.yml
Expand Up @@ -198,15 +198,16 @@ web:
errorUri: "/forgot?status=invalid_sptoken"

# If idSite.enabled is true, the user should be redirected to ID site for
# login, registration, and password reset. They should also be redirected
# through ID Site on logout.
# login, registration, and password reset/verification. They should also be
# redirected through ID Site on logout.
idSite:
enabled: false
uri: "/idSiteResult"
nextUri: "/"
loginUri: ""
forgotUri: "/#/forgot"
registerUri: "/#/register"
verifyUri: "/#/verify"

# Social login configuration. This defines the callback URIs for OAuth
# flows, and the scope that is requested of each provider. Some providers
Expand Down
8 changes: 6 additions & 2 deletions lib/stormpath.js
Expand Up @@ -210,8 +210,12 @@ module.exports.init = function (app, opts) {
}

if (web.verifyEmail.enabled) {
addGetRoute(web.verifyEmail.uri, controllers.verifyEmail);
addPostRoute(web.verifyEmail.uri, controllers.verifyEmail);
if (web.idSite.enabled) {
addGetRoute(web.verifyEmail.uri, controllers.idSiteRedirect({ path: web.idSite.verifyUri }));
} else {
addGetRoute(web.verifyEmail.uri, controllers.verifyEmail);
addPostRoute(web.verifyEmail.uri, controllers.verifyEmail);
}
}

if (web.me.enabled) {
Expand Down