Skip to content

Instantly share code, notes, and snippets.

@arterzatij
Created April 13, 2015 18:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arterzatij/d42aacc7bbdebaa26f84 to your computer and use it in GitHub Desktop.
Save arterzatij/d42aacc7bbdebaa26f84 to your computer and use it in GitHub Desktop.
Pasar validación de mismo origen para localhost
//Configuracion del proveedor de oauth2
app.config([ '$authProvider', function ( $authProvider ) {
$authProvider.oauth2({
name: 'sso',
url: 'auth',
scope: ['read', 'write', 'trust'],
scopeDelimiter: ',',
requiredUrlParams: ['scope'],
redirectUri: location.origin + location.pathname + '#/calculator',
clientId: 'pagos_cliente',
// inicializar endpoint con '127.0.0.1' en lugar de 'localhost', asi pasamos la validacion de same origin
authorizationEndpoint: 'http://127.0.0.1:8080/sso/oauth/authorize'
});
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment