auth flow

This commit is contained in:
arc-alex
2023-11-18 17:53:08 +01:00
parent 31b46bbb34
commit 6b2b6dc6dd
4 changed files with 41 additions and 11 deletions
+8
View File
@@ -106,3 +106,11 @@ router.post('/new', projectSanitiser, postNew);
// create route between controller and '/ontime/sheet-client' endpoint
router.post('/sheet-clientsecrect', uploadFile, sheetClientFile);
// create route between controller and '/ontime/sheet-authstatus' endpoint
router.get('/sheet-authstatus', sheetAuthState);
// create route between controller and '/ontime/sheet-authstatus' endpoint
router.get('/sheet-authurl', sheetAuthUrl);
+1
View File
@@ -143,6 +143,7 @@ class sheet {
*/
public async openAuthServer(): Promise<string | false> {
//TODO: this only works on local networks
//FIXME: the authUrl is not returnd before the second call
if (sheet.authUrl) {
return sheet.authUrl;
}