This application sets up a Solid server and a Github OAuth - Solid-OIDC bridge to interact with your Solid pod. The bridge acts as a proxy to access your data on the Solid server while authenticated with github.
-
Create a GitHub OAuth App:
- Go to your GitHub settings.
- Select Developer settings from the left panel.
- Click on OAuth Apps.
- Click on New OAuth App.
- Fill in the Application name, Homepage URL (
localhost:5002), and Authorization callback URL fields. The Authorization callback URL should match the redirect URI you used in your code (localhost:5000/callback). - Click Register application.
- After you register, you'll see a new page with your Client ID and a Client Secret. Put them in the
.secretfile.
-
Install Dependencies: Navigate to the
solid_serverandbridgefolders and runnpm installin both directories. -
Start the Application: Run
npm run startin both thesolid_serverandbridgefolders.
- Open your browser and go to
localhost:5002. - Log in with your GitHub account. This action will create a Solid pod with your GitHub username, containing private and public folders. The private folder will contain a secret that only you can access.
- Click on "view my secret", and you should see it. If you log out and then return to the secret page and refresh, an error should appear.
- Register a pod at
localhost:3055/idp/register/using the same email as your GitHub account, your GitHub username as the pod name, andpw123as the password. - Place text files in the public and private folders located in the
solid_server/datadirectory. - Access the files via the bridge at
localhost:5002/view/your_username/private/your_fileorlocalhost:5002/view/your_username/public/your_file. Test the access while logged in and not logged in, and also by logging in with another GitHub account.
- For testing, you can create text files in the
publicandprivatefolders of yoursolid_server/datadirectory and try accessing them via the bridge.