Initial commit - cloned the Svelte todo's app with google login enabled as a starting point. This system will initially be used to let the chrome extension for students report which computers are used by which students and when.

This commit is contained in:
2021-09-16 07:26:57 -07:00
commit 08ec0543ca
29 changed files with 2477 additions and 0 deletions

27
server/google-oauth.js Normal file
View File

@@ -0,0 +1,27 @@
/**
* Google cloud platform: https://console.developers.google.com/apis/dashboard
* Setup a OAuth consent screen, then setup OAuth credentials.
* Loads the information from the /private/settings.json file.
*/
try {
let settingsFile = process.env.SETTINGS;
let settings = JSON.parse(Assets.getText(settingsFile));
if (settings) {
ServiceConfiguration.configurations.upsert({
service: "google"
}, {
$set: {
loginStyle: settings.google.loginStyle,
clientId: settings.google.clientId,
secret: settings.google.secret
}
}
);
} else {
console.log("Error: No settings file.");
}
} catch (err) {
console.log(err);
}