Skip to content

Commit

Permalink
add bshop.io to valid jwt check
Browse files Browse the repository at this point in the history
  • Loading branch information
kengoldfarb committed Mar 19, 2018
1 parent 12b0739 commit 12e38e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/skillskit/next/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ var Page = function Page(Wrapped) {
redirect = props.redirect || false;


if (query.back && query.jwt && query.back.search('sprucebot.com') > 0) {
if (query.back && query.jwt && (query.back.search('sprucebot.com') > 0 || query.back.search('bshop.io') > 0)) {
// if there is a jwt, we are being authed
redirect = query.back;
} else if (!redirect && !props.public && (!state.auth || !state.auth.role || state.auth.error)) {
Expand Down
7 changes: 6 additions & 1 deletion src/skillskit/next/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,12 @@ const Page = Wrapped => {

let redirect = props.redirect || false

if (query.back && query.jwt && query.back.search('sprucebot.com') > 0) {
if (
query.back &&
query.jwt &&
(query.back.search('sprucebot.com') > 0 ||
query.back.search('bshop.io') > 0)
) {
// if there is a jwt, we are being authed
redirect = query.back
} else if (
Expand Down

0 comments on commit 12e38e1

Please sign in to comment.