Skip to content

Commit

Permalink
testing themes
Browse files Browse the repository at this point in the history
  • Loading branch information
jayair committed Dec 9, 2024
1 parent 50e7f8d commit c29a915
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 10 additions & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@

There are two sets of examples here, authorizers and clients. Authorizers are examples of setting up an OpenAuth server. The clients are examples of using OpenAuth in a client application and work with any of the authorizer servers.

The fastest way to play around is to use the bun authorizer. You can bring it up with
The fastest way to play around is to use the bun authorizer. You can bring it up with:

```shell
$ bun run --hot ./authorizer/bun/authorizer.ts
```

You might have to install some workspace packages first, run this in the root:

```shell
$ bun install
$ cd packages/openauth
$ bun run build
```

This will bring it up on port 3000. Then try one of the clients - for example the astro one.

```
Expand Down
2 changes: 2 additions & 0 deletions examples/authorizer/bun/authorizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { authorizer } from "@openauthjs/openauth";
import { MemoryStorage } from "@openauthjs/openauth/storage/memory";
import { PasswordAdapter } from "@openauthjs/openauth/adapter/password";
import { PasswordUI } from "@openauthjs/openauth/ui/password";
import { THEME_TERMINAL, THEME_SST, THEME_VERCEL, THEME_SUPABASE } from "@openauthjs/openauth/ui/theme";
import { subjects } from "../../subjects.js";

export default authorizer({
Expand All @@ -18,6 +19,7 @@ export default authorizer({
})
),
},
theme: THEME_SUPABASE,
success: async (ctx, value) => {
if (value.provider === "password") {
return ctx.subject("user", {
Expand Down

0 comments on commit c29a915

Please sign in to comment.