@makefully/adaptfully 3.13.0 → 3.14.0
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.
- package/CHANGELOG.md +7 -0
- package/README.md +4 -1
- package/lib/runtime/auth/_helpers.js +2 -0
- package/lib/runtime/auth/dev-auth.js +8 -0
- package/lib/runtime/auth/google-auth.js +8 -0
- package/lib/runtime/auth/social-auth.js +8 -0
- package/lib/runtime/auth/steam-auth.js +8 -0
- package/lib/runtime/platform.js +21 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## 3.14.0 — 2026-08-21
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **`platform.supportsLogout()`** — whether `logout()` yields a durable signed-out state. Google, social, and dev return `true`; Steam returns `false` (Steamworks identity returns on `autoLogin`). Defaults to `false` when the auth plugin omits the method. Games should hide Sign out UI when this is false.
|
|
10
|
+
- **`platform.requiresEmail()`** — whether a complete identity needs email in addition to id. Google, social, and dev return `true`; Steam returns `false`. Defaults to `true` when unimplemented. Use instead of branching on `auth.name === 'steam'` for session completeness and account-sync routing.
|
|
11
|
+
|
|
5
12
|
## 3.13.0 — 2026-07-24
|
|
6
13
|
|
|
7
14
|
### Added
|
package/README.md
CHANGED
|
@@ -185,7 +185,7 @@ When `steam-auth` is registered on an **`electron`** platform, Adaptfully prebui
|
|
|
185
185
|
- **`main.js`** — Electron shell with Steam overlay enabled and a preload script wired in
|
|
186
186
|
- **`preload.js`** — initializes [steamworks.js](https://github.com/ceifa/steamworks.js) with `platforms.<name>.steamId` and exposes `window.__ADAPTFULLY_STEAMWORKS__`
|
|
187
187
|
|
|
188
|
-
The renderer `steam-auth` plugin reads the Steam ID from that bridge. When Steam is available, `autoLogin()` succeeds immediately with `{ id: steamId64, email: '' }`. Optional config keys:
|
|
188
|
+
The renderer `steam-auth` plugin reads the Steam ID from that bridge. When Steam is available, `autoLogin()` succeeds immediately with `{ id: steamId64, email: '' }`. `supportsLogout()` is `false` and `requiresEmail()` is `false` — games should not offer Sign out, and should treat id-only identity as complete. Optional config keys:
|
|
189
189
|
|
|
190
190
|
| Key | Default | Purpose |
|
|
191
191
|
|-----|---------|---------|
|
|
@@ -229,6 +229,9 @@ import {
|
|
|
229
229
|
- **`runAdaptfullyStage('prebuild' | 'build' | 'deploy', platformKey, options)`** — run a pipeline stage programmatically.
|
|
230
230
|
- **`platform.autoLogin(callback)`** — restore a prior session without UI when the auth plugin supports it (Google uses `lastLoggedIn` in storage and a cached OAuth token).
|
|
231
231
|
- **`platform.supportsAutoLogin()`** — whether the active auth plugin can attempt automatic sign-in.
|
|
232
|
+
- **`platform.logout(callback)`** — clear / revoke the platform session when supported.
|
|
233
|
+
- **`platform.supportsLogout()`** — whether logout is a durable user-facing action. Steam returns `false` (identity is bound to the Steam client); Google, social, and dev return `true`. Prefer this over checking `auth.name` when showing Sign out UI.
|
|
234
|
+
- **`platform.requiresEmail()`** — whether `getUser()` must include email for a complete session. Steam returns `false` (SteamID64 alone); Google, social, and dev return `true`. Prefer this over checking `auth.name` for session sync and account-link routing.
|
|
232
235
|
|
|
233
236
|
---
|
|
234
237
|
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
* @property {(callback: AuthCallback) => void} login
|
|
12
12
|
* @property {(callback: AuthCallback) => void} autoLogin
|
|
13
13
|
* @property {() => boolean} [supportsAutoLogin]
|
|
14
|
+
* @property {() => boolean} [supportsLogout] — durable signed-out state (false for Steamworks-bound identity)
|
|
15
|
+
* @property {() => boolean} [requiresEmail] — whether getUser() must include email for a complete session
|
|
14
16
|
* @property {(callback: () => void) => void} logout
|
|
15
17
|
* @property {() => AuthUser | null} getUser
|
|
16
18
|
* @property {() => boolean} isAuthenticated
|
package/lib/runtime/platform.js
CHANGED
|
@@ -78,6 +78,27 @@
|
|
|
78
78
|
: typeof this.auth.autoLogin === 'function';
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
/**
|
|
82
|
+
* Whether logout() yields a durable signed-out state for this auth backend.
|
|
83
|
+
* Games should hide Sign out UI when this is false (e.g. Steam).
|
|
84
|
+
* Defaults to false when the plugin does not implement the method.
|
|
85
|
+
*/
|
|
86
|
+
supportsLogout() {
|
|
87
|
+
return typeof this.auth.supportsLogout === 'function'
|
|
88
|
+
? this.auth.supportsLogout()
|
|
89
|
+
: false;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Whether a complete identity requires email in addition to id.
|
|
94
|
+
* Id-only backends (Steam) return false. Defaults to true when unimplemented.
|
|
95
|
+
*/
|
|
96
|
+
requiresEmail() {
|
|
97
|
+
return typeof this.auth.requiresEmail === 'function'
|
|
98
|
+
? this.auth.requiresEmail()
|
|
99
|
+
: true;
|
|
100
|
+
}
|
|
101
|
+
|
|
81
102
|
logout(callback) {
|
|
82
103
|
this.whenReady(() => {
|
|
83
104
|
this.auth.logout(() => {
|