-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
3,899 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Backend-Server | ||
|
||
Este es el codigo necesario para establecer el backend conectado a MongoDB usando Mongoose. | ||
|
||
Para ejecutarlo, es necesario reconstruir los modulos de node usando el comando | ||
|
||
``` | ||
npm install | ||
``` | ||
|
||
## Dentro de Google-Signin-demo | ||
Existe un pequeño ejercicio para probar la autenticacion de Google en un Front-End Basico pero funcional. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
module.exports.SEED = '@este-es@-un-seed-dificil' | ||
module.exports.SEED = '@este-es@-un-seed-dificil' | ||
|
||
|
||
module.exports.CLIENT_ID = '1034761070877-v0p1d8hjp2479lo0ii86c8c8rgv38m0j.apps.googleusercontent.com'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>Google signin Demo</title> | ||
|
||
<script src="https://apis.google.com/js/platform.js" async defer></script> | ||
<meta name="google-signin-client_id" content="1034761070877-v0p1d8hjp2479lo0ii86c8c8rgv38m0j.apps.googleusercontent.com"> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<div class="g-signin2" data-onsuccess="onSignIn"></div> | ||
<a href="#" onclick="signOut();">Sign out</a> | ||
|
||
<script> | ||
function signOut() { | ||
var auth2 = gapi.auth2.getAuthInstance(); | ||
auth2.signOut().then(function() { | ||
console.log('User signed out.'); | ||
}); | ||
} | ||
</script> | ||
|
||
<script> | ||
function onSignIn(googleUser) { | ||
var profile = googleUser.getBasicProfile(); | ||
console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead. | ||
console.log('Name: ' + profile.getName()); | ||
console.log('Image URL: ' + profile.getImageUrl()); | ||
console.log('Email: ' + profile.getEmail()); // This is null if the 'email' scope is not present. | ||
var id_token = googleUser.getAuthResponse().id_token; | ||
console.log('Token: ' + id_token); | ||
} | ||
</script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"port": 4200 | ||
} |
Oops, something went wrong.