@startino/better-auth-oidc 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +34 -31
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -97,37 +97,40 @@ await client.signIn.sso({
97
97
  Here is what happens during an SSO sign-in:
98
98
 
99
99
  ```
100
- ┌──────────┐ ┌──────────────┐ ┌─────────┐ ┌─────────┐
101
- Client Auth Server IdP App
102
- └────┬─────┘ └──────┬───────┘ └────┬────┘ └────┬────┘
103
- POST /sign-in/sso│ │
104
- │──────────────────>│
105
- 302 → authorize │ │
106
- │─────────────────>│
107
-
108
- User logs in │ │
109
- │ │
110
- GET /sso/callback
111
- │<─────────────────│
112
- │ │
113
- Exchange code │ │
114
- for tokens
115
- │─────────────────>│
116
- │<─────────────────│
117
-
118
- Create/link user │ │
119
- Create session
120
- Generate OTT
121
- │ │
122
- 302 → callbackURL?ott=TOKEN
123
- │─────────────────────────────────>│
124
-
125
- │ GET /sso/verify-ott?token=… │
126
- │<─────────────────────────────────│
127
-
128
- │ Set session cookie on app domain│
129
- │─────────────────────────────────>│
130
- └ └ └ └
100
+ ┌────────┐ ┌─────────────┐ ┌─────┐ ┌─────┐
101
+ Client Auth Server IdP App
102
+ └───┬────┘ └──────┬──────┘ └──┬──┘ └──┬──┘
103
+
104
+ │ POST /sign-in/sso │ │
105
+ │───────────────────────>│
106
+ │ │
107
+ │ │ 302 → authorize │ │
108
+ │─────────────────────>│
109
+
110
+ User logs in
111
+ │ │
112
+ GET /sso/callback │
113
+ │<─────────────────────│
114
+
115
+ Exchange code │ │
116
+ for tokens │ │
117
+ │─────────────────────>│
118
+ │<─────────────────────│
119
+
120
+ Create/link user
121
+ Create session │
122
+ Generate OTT
123
+ │ │ │
124
+ 302 → callbackURL?ott=TOKEN
125
+ │────────────────────────────────────────>│
126
+ │ │ │
127
+ GET /sso/verify-ott?token=…
128
+ │<────────────────────────────────────────│
129
+ │ │ │
130
+ │ │ Set session cookie on app domain
131
+ │ │────────────────────────────────────────>│
132
+ │ │ │ │
133
+ ▼ ▼ ▼ ▼
131
134
  ```
132
135
 
133
136
  1. **Sign-in request.** The client calls `POST /sign-in/sso` with an email, domain, or provider ID. The plugin finds the matching SSO provider and builds the OIDC authorization URL.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startino/better-auth-oidc",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",