@newgameplusinc/odyssey-sso 2.0.7 → 2.0.8

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 +35 -12
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -25,7 +25,7 @@ const sso = new SSO({
25
25
  // Login
26
26
  sso.login("https://your-app.com/redirect");
27
27
 
28
- // Exchange token from URL and get profile
28
+ // Exchange token from URL and get profile (put it in the root component so that it has access to the url all the time)
29
29
  const user = await sso.exchange();
30
30
 
31
31
  // Fetch user profile
@@ -100,17 +100,40 @@ Logs out the user from the SSO server and clears local storage.
100
100
 
101
101
  ### `onEvents(cb: Cb)`
102
102
 
103
- Subscribe to SDK events. Event types:
104
-
105
- * `login` — user logged in
106
- * `logout` — user logged out
107
- * `refresh`token refreshed
108
- * `profile_fetch`profile fetched
109
- * `profile_update`profile updated
110
- * `profile_photo_update`avatar updated
111
- * `cloth_add/update/delete/fetch`cloth operations
112
- * `material_add/update/delete/fetch`material operations
113
- * `skull_add/update/delete/fetch` — skull operations
103
+ Subscribe to SDK events. The `cb` callback will be called with an event object containing a `type` and `payload`.
104
+
105
+ **Event types:**
106
+
107
+ * **login**user logged in
108
+ * **logout**user logged out
109
+ * **refresh**token refreshed
110
+ * **profile.fetch**profile fetched
111
+ * **profile.update**profile updated
112
+ * **profile-photo.update**avatar updated
113
+
114
+ **Cloth events:**
115
+
116
+ * **cloth.add** — cloth added
117
+ * **cloth.fetch-all** — all cloths fetched
118
+ * **cloth.fetch** — single cloth fetched
119
+ * **cloth.update** — cloth updated
120
+ * **cloth.delete** — cloth deleted
121
+
122
+ **Material events:**
123
+
124
+ * **material.add** — material added
125
+ * **material.fetch-all** — all materials fetched
126
+ * **material.fetch** — single material fetched
127
+ * **material.update** — material updated
128
+ * **material.delete** — material deleted
129
+
130
+ **Skull events:**
131
+
132
+ * **skull.add** — skull added
133
+ * **skull.update** — skull updated
134
+ * **skull.fetch-all** — all skulls fetched
135
+ * **skull.fetch** — single skull fetched
136
+ * **skull.delete** — skull deleted
114
137
 
115
138
  ---
116
139
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newgameplusinc/odyssey-sso",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "description": "Browser SDK for Odyssey SSO Service, handling authentication, user profile, and resource management.",
5
5
  "type": "module",
6
6
  "browser": true,