Skip to content

Don't use hardcoded urls in mt_auth_mixin.js #577

@esopp

Description

@esopp

getMtSsoUrl() {
let { host } = window.location;
if (host === 'encompass.mathematicalthinking.org') {
return `https://sso.mathematicalthinking.org`;
}
if (host === 'enc-test.mathematicalthinking.org') {
return 'https://sso-test.mathematicalthinking.org';
}
if (host === 'localhost:8082') {
return 'http://localhost:3003';
}
return 'http://localhost:3002';
},

getContactEmail() {
let { host } = window.location;
if (host === 'encompass.mathematicalthinking.org') {
return 'encompassmath@gmail.com';
}
return 'encompassmathtesting@gmail.com';
},

NOTE:
This seems like a work-around the original developer may have used because they were having trouble accessing the environment variables. Let's try to actually solve that problem, and get the SSO url (as well as the contact email) from the .env file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Tech DebtIssues having to do with cleaning up legacy code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions