tevrocsdk 0.1.77 → 0.1.78
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/README.md +25 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -76,7 +76,7 @@ await tevroc.auth.resetPassword({ email: "ada@example.com" });
|
|
|
76
76
|
await tevroc.auth.loginUrl("/dashboard");
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
###
|
|
79
|
+
### Social sign-in
|
|
80
80
|
```js
|
|
81
81
|
await tevroc.auth.googleLogin({
|
|
82
82
|
appId: "tevroc-portal",
|
|
@@ -98,8 +98,32 @@ await tevroc.auth.loginWithGoogle({
|
|
|
98
98
|
});
|
|
99
99
|
|
|
100
100
|
await tevroc.auth.loginWithProvider("google", "/dashboard");
|
|
101
|
+
|
|
102
|
+
await tevroc.auth.facebookLogin({
|
|
103
|
+
appId: "tevroc-portal",
|
|
104
|
+
appName: "Tevroc Portal",
|
|
105
|
+
serviceUrl: "https://services.example.com",
|
|
106
|
+
});
|
|
107
|
+
tevroc.auth.onFacebookLogin((user, error) => {
|
|
108
|
+
if (error) console.error("Facebook login failed", error);
|
|
109
|
+
});
|
|
110
|
+
await tevroc.auth.loginWithFacebook({ accessToken: facebookAccessToken });
|
|
111
|
+
await tevroc.auth.loginWithProvider("facebook", "/dashboard");
|
|
112
|
+
|
|
113
|
+
await tevroc.auth.metaLogin({
|
|
114
|
+
appId: "tevroc-whatsapp",
|
|
115
|
+
appName: "Tevroc WhatsApp",
|
|
116
|
+
serviceUrl: "https://services.example.com",
|
|
117
|
+
});
|
|
118
|
+
tevroc.auth.onMetaLogin((user, error) => {
|
|
119
|
+
if (error) console.error("Meta login failed", error);
|
|
120
|
+
});
|
|
121
|
+
await tevroc.auth.loginWithMeta({ accessToken: metaAccessToken });
|
|
122
|
+
await tevroc.auth.loginWithProvider("meta", "/dashboard");
|
|
101
123
|
```
|
|
102
124
|
|
|
125
|
+
The SDK supports Google, Facebook, and Meta social authentication alongside traditional email/password flows. Meta login is intended for Meta Business and WhatsApp onboarding.
|
|
126
|
+
|
|
103
127
|
## Entities
|
|
104
128
|
|
|
105
129
|
Entities are the main data layer for your app. Use them for create/read/update/delete workflows and list/query operations.
|