mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[MM-54402] Change protocol transform method for Desktop Auth to be compliant with web standards (#24479)
This commit is contained in:
@@ -85,13 +85,12 @@ const DesktopAuthToken: React.FC<Props> = ({href, onLogin}: Props) => {
|
||||
|
||||
const forwardToDesktopApp = () => {
|
||||
const url = new URL(window.location.href);
|
||||
let protocol = 'mattermost';
|
||||
if (url.searchParams.get('isDesktopDev')) {
|
||||
url.protocol = 'mattermost-dev';
|
||||
} else {
|
||||
url.protocol = 'mattermost';
|
||||
protocol = 'mattermost-dev';
|
||||
}
|
||||
|
||||
window.location.href = url.toString();
|
||||
window.location.href = url.toString().replace(url.protocol, `${protocol}:`);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user