Skip to content

Commit 344255e

Browse files
author
Sachin Maheshwari
committed
cleaning up
1 parent 024e981 commit 344255e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

web-assets/js/setupAuth0WithRedirect.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const authSetup = function () {
4646
const mode = qs['mode'] || 'signIn';
4747
let returnAppUrl = handleSpecificReturnUrl(qs['retUrl'], 'retUrl');
4848
let appUrl = qs['appUrl'] || false;
49-
const discord_patterns = ['https://tc-topbot-1.herokuapp.com/', 'webhooks'];
49+
const discord_pattern = 'https://tc-topbot-1.herokuapp.com/';
5050

5151
if (utmSource &&
5252
(utmSource != 'undefined') &&
@@ -671,7 +671,7 @@ const authSetup = function () {
671671
hostdomain = "." + location.hostname.split('.').reverse()[1] +
672672
"." + location.hostname.split('.').reverse()[0];
673673
}
674-
const prefixArray = ['apps', 'software', 'herokuapp'];
674+
const prefixArray = ['apps', 'software'];
675675
if (hostdomain && value) {
676676
for (let i = 0; i < prefixArray.length; i++) {
677677
if (value.indexOf(prefixArray[i] + hostdomain) > -1) {
@@ -705,7 +705,7 @@ const authSetup = function () {
705705
};
706706

707707
function hookRedirect(redirect_url) {
708-
if (redirect_url && ((redirect_url.indexOf(discord_patterns[0]) > -1) || (redirect_url.indexOf(discord_patterns[1]) > -1) ) ) {
708+
if (redirect_url && (redirect_url.indexOf(discord_pattern) > -1)) {
709709
try {
710710
var newUrl = new URL(redirect_url);
711711
newUrl.searchParams.append(

0 commit comments

Comments
 (0)