lib/passport-steam/strategy.js
function verify(req, identifier, profile, done) {
    var validOpEndpoint = 'https://steamcommunity.com/openid/login';
    var identifierRegex = /^https?:\/\/steamcommunity\.com\/openid\/id\/(\d+)$/;

    if(req.query['openid.op_endpoint'] !== validOpEndpoint ||
       !identifierRegex.test(identifier)) {
      return done(null, false, { message: 'Claimed identity is invalid.' });
    }

    var steamID = identifierRegex.exec(identifier)[0];

    if(options.profile) {
      getUserProfile(options.apiKey, steamID, function(err, profile) {
        if(err) {
          done(err);
        } else {
          if(originalPassReqToCallback) {
            validate(req, identifier, profile, done);
          } else {
            validate(identifier, profile, done);
          }
        }
      });
    } else {
      if(originalPassReqToCallback) {
        validate(req, identifier, profile, done);
      } else {
        validate(identifier, profile, done);
      }
    }
  }
function verify(req, identifier, profile, done) {
    var validOpEndpoint = 'https://steamcommunity.com/openid/login';
    var identifierRegex = /^https?:\/\/steamcommunity\.com\/openid\/id\/(\d+)$/;

    if(req.query['openid.op_endpoint'] !== validOpEndpoint ||
       !identifierRegex.test(identifier)) {
      return done(null, false, { message: 'Claimed identity is invalid.' });
    }

    var steamID = identifierRegex.exec(identifier)[0];

    if(options.profile) {
      getUserProfile(options.apiKey, steamID, function(err, profile) {
        if(err) {
          done(err);
        } else {
          if(originalPassReqToCallback) {
            validate(req, identifier, profile, done);
          } else {
            validate(identifier, profile, done);
          }
        }
      });
    } else {
      if(originalPassReqToCallback) {
        validate(req, identifier, profile, done);
      } else {
        validate(identifier, profile, done);
      }
    }
  }
function verify ( req , identifier , profile , done ) { var validOpEndpoint = 'https://steamcommunity.com/openid/login' ; var identifierRegex = / ^https?:\/\/steamcommunity\.com\/openid\/id\/(\d+)$ / ; if ( req . query [ 'openid.op_endpoint' ] !== validOpEndpoint || ! identifierRegex . test ( identifier ) ) { return done ( null , false , { message : 'Claimed identity is invalid.' } ) ; } var steamID = identifierRegex . exec ( identifier ) [ 0 ] ; if ( options . profile ) { getUserProfile ( options . apiKey , steamID , function ( err , profile ) { if ( err ) { done ( err ) ; } else { if ( originalPassReqToCallback ) { validate ( req , identifier , profile , done ) ; } else { validate ( identifier , profile , done ) ; } } } ) ; } else { if ( originalPassReqToCallback ) { validate ( req , identifier , profile , done ) ; } else { validate ( identifier , profile , done ) ; } } }
Request needs to be verified
Request needs to be verified