Skip to content
Open
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
12 changes: 8 additions & 4 deletions astro-authproto/__examples__/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,22 @@ how to use `@fujocoded/authproto` to achieve all your dreams.

## Our Examples

1. TODO: the simplest example => Just shows you how to log in/out
2. TODO: the almost-simplest example =>
1. the simplest example: login-logout =>
- Just shows you how to log in/out
2. the almost-simplest example: read-bsky-profile =>
- Logged out: Show FujoCoded's Bluesky profile
- Logged in: Show the logged-in user Bluesky profile
- Stretch: get someone to sponsor a paid ad for another service
3. Stepping it up: Reading and Writing Records from/to a PDS
3. Stepping it up: read-write-records =>
- reads and writes records from a PDS
- Add bits scopes here
4. Extra: auth-only-pages =>
- restrict pages to e.g. mutuals

### Extras

4. Redirect configuration
5. Restrict pages to e.g. friends

// FUTURE
// Astro DB?
// Astro DB?
27 changes: 27 additions & 0 deletions astro-authproto/__examples__/login-logout/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# build output
dist/
# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*


# environment variables
.env
.env.production

# macOS-specific files
.DS_Store

# jetbrains setting folder
.idea/

# session data
tmp/
3 changes: 3 additions & 0 deletions astro-authproto/__examples__/login-logout/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Very simple implementation of @fujocoded/authproto that shows off login/logout functionality.

Nothing super special, see [existing @fujocoded/authproto README](../../README.md).
25 changes: 25 additions & 0 deletions astro-authproto/__examples__/login-logout/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// @ts-check
import { defineConfig } from 'astro/config';
import authProto from "@fujocoded/authproto";
import node from "@astrojs/node";

// https://astro.build/config
export default defineConfig({
output: "server",
adapter: node({
mode: "standalone",
}),
integrations: [
authProto({
applicationName: "Login Logout",
applicationDomain: "localhost:4321",
driver: {
name: "fs",
options: {
base: "./tmp"
},
},
}),
],
});

Loading