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
<link rel="import" href="../components/polymer/polymer.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
top: 0px; | |
left: 0px; |
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
<link rel="import" href="../components/polymer/polymer.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
#core_scroll_header_panel { | |
width: 100%; | |
height: 100%; | |
left: 0px; |
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
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-scroll-header-panel/core-scroll-header-panel.html"> | |
<link rel="import" href="../core-ajax/core-ajax.html"> | |
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<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
<!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>Document</title> | |
</head> | |
<body> |
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
<!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>Document</title> | |
</head> | |
<body> |
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
// Create a Recaptcha verifier instance globally | |
// Calls submitPhoneNumberAuth() when the captcha is verified | |
window.recaptchaVerifier = new firebase.auth.RecaptchaVerifier( | |
"recaptcha-container", | |
{ | |
size: "normal", | |
callback: function(response) { | |
submitPhoneNumberAuth(); | |
} |
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
// Create a Recaptcha verifier instance globally | |
// Calls submitPhoneNumberAuth() when the captcha is verified | |
window.recaptchaVerifier = new firebase.auth.RecaptchaVerifier( | |
"recaptcha-container", | |
{ | |
size: "normal", | |
callback: function(response) { | |
submitPhoneNumberAuth(); | |
} |
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 function runs when the 'sign-in-button' is clicked | |
// Takes the value from the 'phoneNumber' input and sends SMS to that phone number | |
function submitPhoneNumberAuth() { | |
var phoneNumber = document.getElementById("phoneNumber").value; | |
var appVerifier = window.recaptchaVerifier; | |
firebase | |
.auth() | |
.signInWithPhoneNumber(phoneNumber, appVerifier) | |
.then(function(confirmationResult) { | |
window.confirmationResult = confirmationResult; |
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 function runs when the 'sign-in-button' is clicked | |
// Takes the value from the 'phoneNumber' input and sends SMS to that phone number | |
function submitPhoneNumberAuth() { | |
// We are using the test phone numbers we created before | |
// var phoneNumber = document.getElementById("phoneNumber").value; | |
var phoneNumber = '+16005551234'; | |
var appVerifier = window.recaptchaVerifier; | |
firebase | |
.auth() | |
.signInWithPhoneNumber(phoneNumber, appVerifier) |
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
<!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>Document</title> | |
</head> | |
<body> |
OlderNewer