added a register route via token
This commit is contained in:
+2
-1
@@ -10,10 +10,11 @@ import {FourOFourScene} from "./Phaser/Reconnecting/FourOFourScene";
|
||||
import WebGLRenderer = Phaser.Renderer.WebGL.WebGLRenderer;
|
||||
import {OutlinePipeline} from "./Phaser/Shaders/OutlinePipeline";
|
||||
import {CustomizeScene} from "./Phaser/Login/CustomizeScene";
|
||||
import {HtmlUtils} from "./WebRtc/HtmlUtils";
|
||||
import {CoWebsiteManager} from "./WebRtc/CoWebsiteManager";
|
||||
import {redirectIfToken} from "./register";
|
||||
|
||||
//CoWebsiteManager.loadCoWebsite('https://thecodingmachine.com');
|
||||
redirectIfToken();
|
||||
|
||||
// Load Jitsi if the environment variable is set.
|
||||
if (JITSI_URL) {
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
import Axios from "axios";
|
||||
import {API_URL} from "./Enum/EnvironmentVariable";
|
||||
declare let window:Window;
|
||||
|
||||
export function redirectIfToken() {
|
||||
const match = window.location.toString().match(/\/register\/(.+)/);
|
||||
if (match) {
|
||||
Axios.get(`${API_URL}/register/`+match[1]).then((res) => {
|
||||
window.location = res.data.loginUrl;
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user