Framework-agnostic OAuth integration for AT Protocol (Bluesky) applications.
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: bump atproto-storage to v1.1.0, fix valTownAdapter → sqliteAdapter in docs

+15 -13
+3 -3
README.md
··· 47 47 48 48 ```typescript 49 49 import { createATProtoOAuth } from "jsr:@tijs/atproto-oauth"; 50 - import { SQLiteStorage, valTownAdapter } from "jsr:@tijs/atproto-storage"; 50 + import { SQLiteStorage, sqliteAdapter } from "jsr:@tijs/atproto-storage"; 51 51 ``` 52 52 53 53 ## Usage ··· 56 56 57 57 ```typescript 58 58 import { createATProtoOAuth } from "jsr:@tijs/atproto-oauth"; 59 - import { SQLiteStorage, valTownAdapter } from "jsr:@tijs/atproto-storage"; 59 + import { SQLiteStorage, sqliteAdapter } from "jsr:@tijs/atproto-storage"; 60 60 import { sqlite } from "https://esm.town/v/std/sqlite"; 61 61 62 62 const oauth = createATProtoOAuth({ 63 63 baseUrl: "https://myapp.example.com", 64 64 appName: "My App", 65 65 cookieSecret: Deno.env.get("COOKIE_SECRET")!, 66 - storage: new SQLiteStorage(valTownAdapter(sqlite)), 66 + storage: new SQLiteStorage(sqliteAdapter(sqlite)), 67 67 sessionTtl: 60 * 60 * 24 * 14, // 14 days 68 68 }); 69 69 ```
+5 -3
deno.json
··· 12 12 "README.md", 13 13 "LICENSE" 14 14 ], 15 - "exclude": ["**/*.test.ts"] 15 + "exclude": [ 16 + "**/*.test.ts" 17 + ] 16 18 }, 17 19 "imports": { 18 20 "@std/assert": "jsr:@std/assert@1.0.16", 19 21 "@tijs/oauth-client-deno": "jsr:@tijs/oauth-client-deno@5.1.0", 20 22 "@tijs/atproto-sessions": "jsr:@tijs/atproto-sessions@2.1.0", 21 - "@tijs/atproto-storage": "jsr:@tijs/atproto-storage@0.1.1", 23 + "@tijs/atproto-storage": "jsr:@tijs/atproto-storage@1.1.0", 22 24 "@atproto/syntax": "npm:@atproto/syntax@0.3.0" 23 25 }, 24 26 "compilerOptions": { ··· 33 35 "quality": "deno fmt && deno lint && deno check mod.ts", 34 36 "ci": "deno task quality && deno task test" 35 37 } 36 - } 38 + }
+1 -1
docs/mobile-authentication.md
··· 34 34 baseUrl: "https://myapp.example.com", 35 35 appName: "My App", 36 36 cookieSecret: Deno.env.get("COOKIE_SECRET")!, 37 - storage: new SQLiteStorage(valTownAdapter(sqlite)), 37 + storage: new SQLiteStorage(sqliteAdapter(sqlite)), 38 38 sessionTtl: 60 * 60 * 24 * 14, 39 39 mobileScheme: "myapp://auth-callback", // Your app's URL scheme 40 40 });
+2 -2
docs/web-authentication.md
··· 20 20 21 21 ```typescript 22 22 import { createATProtoOAuth } from "jsr:@tijs/atproto-oauth"; 23 - import { SQLiteStorage, valTownAdapter } from "jsr:@tijs/atproto-storage"; 23 + import { SQLiteStorage, sqliteAdapter } from "jsr:@tijs/atproto-storage"; 24 24 ``` 25 25 26 26 ### Configuration ··· 30 30 baseUrl: "https://myapp.example.com", 31 31 appName: "My App", 32 32 cookieSecret: Deno.env.get("COOKIE_SECRET")!, // At least 32 characters 33 - storage: new SQLiteStorage(valTownAdapter(sqlite)), 33 + storage: new SQLiteStorage(sqliteAdapter(sqlite)), 34 34 sessionTtl: 60 * 60 * 24 * 14, // 14 days (max for public clients) 35 35 logoUri: "https://myapp.example.com/logo.png", // Optional 36 36 policyUri: "https://myapp.example.com/privacy", // Optional
+2 -2
mod.ts
··· 9 9 * @example 10 10 * ```typescript 11 11 * import { createATProtoOAuth } from "@tijs/atproto-oauth"; 12 - * import { SQLiteStorage, valTownAdapter } from "@tijs/atproto-storage"; 12 + * import { SQLiteStorage, sqliteAdapter } from "@tijs/atproto-storage"; 13 13 * 14 14 * const oauth = createATProtoOAuth({ 15 15 * baseUrl: "https://myapp.example.com", 16 16 * appName: "My App", 17 17 * cookieSecret: Deno.env.get("COOKIE_SECRET")!, 18 - * storage: new SQLiteStorage(valTownAdapter(sqlite)), 18 + * storage: new SQLiteStorage(sqliteAdapter(sqlite)), 19 19 * }); 20 20 * 21 21 * // Mount routes in your framework
+2 -2
src/oauth.ts
··· 36 36 * @example Basic setup 37 37 * ```typescript 38 38 * import { createATProtoOAuth } from "@tijs/atproto-oauth"; 39 - * import { SQLiteStorage, valTownAdapter } from "@tijs/atproto-storage"; 39 + * import { SQLiteStorage, sqliteAdapter } from "@tijs/atproto-storage"; 40 40 * 41 41 * const oauth = createATProtoOAuth({ 42 42 * baseUrl: "https://myapp.example.com", 43 43 * appName: "My App", 44 44 * cookieSecret: Deno.env.get("COOKIE_SECRET")!, 45 - * storage: new SQLiteStorage(valTownAdapter(sqlite)), 45 + * storage: new SQLiteStorage(sqliteAdapter(sqlite)), 46 46 * sessionTtl: 60 * 60 * 24 * 14, // 14 days 47 47 * }); 48 48 *