Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from Ahmet-Kaplan/master
Added firebase login
- Loading branch information
Showing
10 changed files
with
5,390 additions
and
30 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,26 @@ | ||
<template lang="html"> | ||
<div id="firebaseui-auth-container"></div> | ||
</template> | ||
|
||
<script> | ||
import firebase from 'firebase' | ||
import firebaseui from 'firebaseui' | ||
export default { | ||
name: 'auth', | ||
mounted () { | ||
var uiConfig = { | ||
signInSuccessUrl: '/success', | ||
signInOptions: [ | ||
firebase.auth.GoogleAuthProvider.PROVIDER_ID, | ||
firebase.auth.EmailAuthProvider.PROVIDER_ID | ||
] | ||
} | ||
var ui = new firebaseui.auth.AuthUI(firebase.auth()) | ||
ui.start('#firebaseui-auth-container', uiConfig) | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="css"> | ||
</style> |
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,46 @@ | ||
<template> | ||
<div> | ||
<h1>Signup succeeded</h1> | ||
<button @click='logOut'>Log out</button> | ||
<hr> | ||
<img :src="photo" style='height: 120px'> | ||
<br> | ||
<p>{{name}}</p> | ||
<p>{{email}}</p> | ||
<p>{{userId}}</p> | ||
<hr> | ||
<pre>{{user}}</pre> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import firebase from 'firebase' | ||
export default { | ||
data () { | ||
return { | ||
photo: '', | ||
userId: '', | ||
name: '', | ||
email: '', | ||
user: {} | ||
} | ||
}, | ||
created () { | ||
var vm = this | ||
firebase.auth().onAuthStateChanged(function (user) { | ||
if (user) { | ||
vm.user = user | ||
vm.name = vm.user.displayName | ||
vm.email = vm.user.email | ||
vm.photo = vm.user.photoURL | ||
vm.userId = vm.user.uid | ||
} | ||
}) | ||
}, | ||
methods: { | ||
logOut () { | ||
firebase.auth().signOut() | ||
} | ||
} | ||
} | ||
</script> |
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
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
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,8 @@ | ||
export const config = { | ||
apiKey: 'AIzaSyAtAQsA7-max7T6WWK0Co079ew2mWp6kn8', | ||
authDomain: 'triphin-ccbdb.firebaseapp.com', | ||
databaseURL: 'https://triphin-ccbdb.firebaseio.com', | ||
projectId: 'triphin-ccbdb', | ||
storageBucket: 'triphin-ccbdb.appspot.com', | ||
messagingSenderId: '395196543424' | ||
} |
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,17 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="format-detection" content="telephone=no"> | ||
<meta name="msapplication-tap-highlight" content="no"> | ||
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width"> | ||
|
||
<title>Quasar Admin Examples</title> | ||
<link rel="shortcut icon" type="image/x-icon" href="statics/favicon.ico"> | ||
</head> | ||
<body> | ||
<link type="text/css" rel="stylesheet" href="statics/firebaseui.css" /> | ||
</head> | ||
|
||
<body> | ||
<div id="q-app"></div> | ||
<!-- built files will be auto injected --> | ||
<script src="https://maps.google.com/maps/api/js?key=AIzaSyAYCzEZ0tKmY_SeTJJ9aBDe4wyk68irIwM"></script> | ||
</body> | ||
</html> | ||
</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
Large diffs are not rendered by default.
Oops, something went wrong.