Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
/data
/coverage
/node_modules
/npm-debug.log
/npm-debug.log
.history/
18 changes: 18 additions & 0 deletions bin/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"root": "/Users/imyshor/Projects/solid/solidos/workspaces/node-solid-server/bin/data",
"port": "8443",
"serverUri": "https://localhost:8443",
"webid": false,
"mount": "/",
"configPath": "./config",
"configFile": "./config.json",
"dbPath": "./.db",
"sslKey": "../",
"sslCert": "../",
"multiuser": false,
"server": {
"name": "localhost",
"description": "",
"logo": ""
}
}
11 changes: 7 additions & 4 deletions common/js/index-buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ function register() {
alert(2); window.location.href = "/register";
}
document.addEventListener('DOMContentLoaded', async function() {
if (!UI.authn.currentUser()) await UI.authn.checkUser();
let user = UI.authn.currentUser();
const authn = UI.authn
const authSession = UI.authn.authSession

if (!authn.currentUser()) await authn.checkUser();
let user = authn.currentUser();

// IF LOGGED IN: SET SolidServerRootRedirectLink. LOGOUT
if( user ) {
window.localStorage.setItem(keyname, user.uri);
await UI.authn.authSession.logout();
await authSession.logout();
}
else {
let webId = window.localStorage.getItem(keyname);
Expand All @@ -31,7 +34,7 @@ document.addEventListener('DOMContentLoaded', async function() {
let span = document.createElement("span")
span.innerHTML = html
loginArea.appendChild(span);
loginArea.appendChild(UI.authn.loginStatusBox(document, null, {}))
loginArea.appendChild(UI.login.loginStatusBox(document, null, {}))
const logInButton = loginArea.querySelectorAll('input')[1];
logInButton.value = "Log in to see your WebID";
const signUpButton = loginArea.querySelectorAll('input')[2];
Expand Down
Loading