Skip to content

Commit

Permalink
Merge pull request #10 from maker27/master
Browse files Browse the repository at this point in the history
Replace http in url with https
ozon1234 authored Feb 7, 2023
2 parents f88c930 + 20ab57b commit e837a55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/passport-odnoklassniki/strategy.js
Original file line number Diff line number Diff line change
@@ -47,8 +47,8 @@ function Strategy(options, verify) {
}

options = options || {};
options.authorizationURL = options.authorizationURL || 'http://www.odnoklassniki.ru/oauth/authorize';
options.tokenURL = options.tokenURL || 'http://api.odnoklassniki.ru/oauth/token.do';
options.authorizationURL = options.authorizationURL || 'https://www.odnoklassniki.ru/oauth/authorize';
options.tokenURL = options.tokenURL || 'https://api.odnoklassniki.ru/oauth/token.do';
options.scopeSeparator = options.scopeSeparator || ';';

OAuth2Strategy.call(this, options, verify);
@@ -112,7 +112,7 @@ Strategy.prototype.userProfile = function (accessToken, done) {
crypto.createHash('md5').update(accessToken + this._oauth2._clientSecret, 'utf8').digest('hex')
].join(''), 'utf8').digest('hex');

this._oauth2.getProtectedResource('http://api.odnoklassniki.ru/fb.do?method=users.getCurrentUser&application_key=' + this._clientPublic + '&sig=' + sig, accessToken, function (err, body, res) {
this._oauth2.getProtectedResource('https://api.odnoklassniki.ru/fb.do?method=users.getCurrentUser&application_key=' + this._clientPublic + '&sig=' + sig, accessToken, function (err, body, res) {
if (err) { return done(new InternalOAuthError('failed to fetch user profile', err)); }

try {

0 comments on commit e837a55

Please sign in to comment.