dist/oauth-ng.js
function(hash){
    var params = {},
        regex = /([^&=]+)=([^&]*)/g,
        m;

    while ((m = regex.exec(hash)) !== null) {
      params[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);
    }

    // OpenID Connect
    if (params.id_token && !params.error) {
      IdToken.validateTokensAndPopulateClaims(params);
      return params;
    }

    // Oauth2
    if(params.access_token || params.error){
      return params;
    }
  }
function(hash){
    var params = {},
        regex = /([^&=]+)=([^&]*)/g,
        m;

    while ((m = regex.exec(hash)) !== null) {
      params[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);
    }

    // OpenID Connect
    if (params.id_token && !params.error) {
      IdToken.validateTokensAndPopulateClaims(params);
      return params;
    }

    // Oauth2
    if(params.access_token || params.error){
      return params;
    }
  }
function ( hash ) { var params = { } , regex = / ([^&=]+)=([^&]*) / g , m ; while ( ( m = regex . exec ( hash ) ) !== null ) { params [ decodeURIComponent ( m [ 1 ] ) ] = decodeURIComponent ( m [ 2 ] ) ; } // OpenID Connect if ( params . id_token && ! params . error ) { IdToken . validateTokensAndPopulateClaims ( params ) ; return params ; } // Oauth2 if ( params . access_token || params . error ) { return params ; } }
Parse the fragment URI and return an object
@param hash
@returns {{}}
Parse the fragment URI and return an object