@progalaxyelabs/ngx-stonescriptphp-client 1.18.2 → 1.18.3
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.
|
@@ -835,16 +835,18 @@ class ProgalaxyElabsAuth {
|
|
|
835
835
|
}
|
|
836
836
|
// -- Internal helpers -----------------------------------------------------
|
|
837
837
|
handleLoginResponse(data) {
|
|
838
|
-
//
|
|
839
|
-
|
|
838
|
+
// Identity with no tenant memberships — needs onboarding
|
|
839
|
+
// Covers both new registration (is_new_identity=true) and
|
|
840
|
+
// returning user who hasn't created a tenant yet (is_new_identity=false, memberships=[])
|
|
841
|
+
if (data.identity && (!data.membership)) {
|
|
840
842
|
return {
|
|
841
843
|
success: true,
|
|
842
844
|
accessToken: data.access_token,
|
|
843
845
|
refreshToken: data.refresh_token,
|
|
844
|
-
|
|
846
|
+
user: this.toUser(data.identity),
|
|
847
|
+
isNewIdentity: data.is_new_identity ?? false,
|
|
845
848
|
authMethod: data.auth_method,
|
|
846
849
|
oauthProvider: data.oauth_provider,
|
|
847
|
-
user: this.toUser(data.identity),
|
|
848
850
|
};
|
|
849
851
|
}
|
|
850
852
|
// Multi-tenant selection required
|