Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert oauth2-server-config package to js #7017

Merged
merged 10 commits into from
May 31, 2017
Prev Previous commit
Next Next commit
Update oauth2-client.js
fix an logic error
  • Loading branch information
ggazzo authored May 31, 2017
commit fc0a1ab1f1c9f3ab4df5cf6e1a508d87fdc6eddc
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,11 @@ Template.authorize.events({
});

Template.authorize.onRendered(function() {
this.autorun((c) => {
this.autorun(c => {
const user = Meteor.user();
if (user && user.oauth && user.oauth.authorizedClients) {
if (user.oauth.authorizedClients.indexOf(this.data.client_id() > -1)) {
c.stop();
$('button[type=submit]').click();
}
if (user && user.oauth && user.oauth.authorizedClients && user.oauth.authorizedClients.includes(this.data.client_id())) {
c.stop();
$('button[type=submit]').click();
}
});
});