Skip to content

Commit

Permalink
Release v2.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
leinue committed Aug 7, 2019
1 parent f2cdccb commit 2734ea5
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 49 deletions.
2 changes: 1 addition & 1 deletion dist/authing-js-sdk-browser.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/authing-js-sdk-browser.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/authing-js-sdk.js

Large diffs are not rendered by default.

34 changes: 13 additions & 21 deletions examples/wxapp.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,21 @@
clientId: '5cc2a350e056c76eea71db8a',
timestamp: Math.round(new Date() / 1000),
nonce: Math.ceil(Math.random() * Math.pow(10, 6)),
// host: {
// user: 'https://users.celebes.live/graphql',
// oauth: 'https://oauth.celebes.live/graphql'
// },
enableFetchPhone: true,
noSecurityChecking: true,
// useSelfWxapp: true,
useSelfWxapp: true,
});

// auth.then((authing) => {
authing.startWXAppScaning({
redirect: false,
onSuccess(userInfo) {
console.log(userInfo);
},
onQRCodeLoad(qrcode) {
console.log('load', qrcode);
},
onQRCodeShow(qrcode) {
console.log('show', qrcode);
}
})
// });
authing.startWXAppScaning({
redirect: false,
onSuccess(userInfo) {
console.log(userInfo);
},
onQRCodeLoad(qrcode) {
console.log('load', qrcode);
},
onQRCodeShow(qrcode) {
console.log('show', qrcode);
}
})

</script>

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "authing-js-sdk",
"version": "2.13.0",
"version": "2.14.0",
"description": "Official sdk of Authing",
"main": "dist/authing-js-sdk.js",
"browser": "dist/authing-js-sdk-browser.min.js",
Expand Down
33 changes: 9 additions & 24 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function Authing(opts) {
this.opts = opts;
this.opts.useSelfWxapp = opts.useSelfWxapp || false;
this.opts.enableFetchPhone = opts.enableFetchPhone || false;
this.opts.timeout = opts.timeout || 8000;
this.opts.timeout = opts.timeout || 10000;
this.opts.noSecurityChecking = opts.noSecurityChecking || false;

if (opts.host) {
Expand Down Expand Up @@ -691,22 +691,26 @@ Authing.prototype = {
}).then(res => res.userPatch);
},

list(page, count) {
list(page, count, queryOptions) {
this.haveAccess();

page = page || 1;
count = count || 10;
queryOptions = queryOptions || {
populate: false
};

const options = {
registerInClient: this.opts.clientId,
page,
count
count,
populate: queryOptions.populate
};

return this.ownerClient.request({
operationName: 'users',
query: `query users($registerInClient: String, $page: Int, $count: Int){
users(registerInClient: $registerInClient, page: $page, count: $count) {
query: `query users($registerInClient: String, $page: Int, $count: Int, $populate: Boolean){
users(registerInClient: $registerInClient, page: $page, count: $count, populate: $populate) {
totalCount
list {
_id
Expand All @@ -727,19 +731,6 @@ Authing.prototype = {
signedUp
blocked
isDeleted
group {
_id
name
descriptions
createdAt
}
clientType {
_id
name
description
image
example
}
userLocation {
_id
when
Expand All @@ -755,12 +746,6 @@ Authing.prototype = {
result
}
}
systemApplicationType {
_id
name
descriptions
price
}
}
}
}`,
Expand Down

0 comments on commit 2734ea5

Please sign in to comment.