@xuda.io/account_module 1.2.1327 → 1.2.1328
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/index.mjs +0 -19
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -990,25 +990,6 @@ export const search_users = async function (req) {
|
|
|
990
990
|
}
|
|
991
991
|
};
|
|
992
992
|
|
|
993
|
-
const generate_gmail_access_token = async function (email_account) {
|
|
994
|
-
return new Promise((resolve, reject) => {
|
|
995
|
-
fetch('https://oauth2.googleapis.com/token', {
|
|
996
|
-
method: 'POST',
|
|
997
|
-
headers: { 'Content-Type': 'application/json' },
|
|
998
|
-
body: JSON.stringify({
|
|
999
|
-
refresh_token: email_account.authorization_data.refresh_token,
|
|
1000
|
-
client_id: _conf.gmail.clientId,
|
|
1001
|
-
client_secret: _conf.gmail.clientSecret,
|
|
1002
|
-
grant_type: 'refresh_token',
|
|
1003
|
-
}),
|
|
1004
|
-
})
|
|
1005
|
-
.then((response) => response.json())
|
|
1006
|
-
.then((data) => {
|
|
1007
|
-
resolve(data);
|
|
1008
|
-
});
|
|
1009
|
-
});
|
|
1010
|
-
};
|
|
1011
|
-
|
|
1012
993
|
export const find_contact_duplicates = async function (req) {
|
|
1013
994
|
const { uid, name } = req;
|
|
1014
995
|
var opt = {
|