Search
 
SCRIPT & CODE EXAMPLE
 

CSS

css sign in with google

<html><head>  <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet" type="text/css">  <script src="https://apis.google.com/js/api:client.js"></script>  <script>  var googleUser = {};  var startApp = function() {    gapi.load('auth2', function(){      // Retrieve the singleton for the GoogleAuth library and set up the client.      auth2 = gapi.auth2.init({        client_id: 'YOUR_CLIENT_ID.apps.googleusercontent.com',        cookiepolicy: 'single_host_origin',        // Request scopes in addition to 'profile' and 'email'        //scope: 'additional_scope'      });      attachSignin(document.getElementById('customBtn'));    });  };  function attachSignin(element) {    console.log(element.id);    auth2.attachClickHandler(element, {},        function(googleUser) {          document.getElementById('name').innerText = "Signed in: " +              googleUser.getBasicProfile().getName();        }, function(error) {          alert(JSON.stringify(error, undefined, 2));        });  }  </script>  <style type="text/css">    #customBtn {      display: inline-block;      background: white;      color: #444;      width: 190px;      border-radius: 5px;      border: thin solid #888;      box-shadow: 1px 1px 1px grey;      white-space: nowrap;    }    #customBtn:hover {      cursor: pointer;    }    span.label {      font-family: serif;      font-weight: normal;    }    span.icon {      background: url('/identity/sign-in/g-normal.png') transparent 5px 50% no-repeat;      display: inline-block;      vertical-align: middle;      width: 42px;      height: 42px;    }    span.buttonText {      display: inline-block;      vertical-align: middle;      padding-left: 42px;      padding-right: 42px;      font-size: 14px;      font-weight: bold;      /* Use the Roboto font that is loaded in the <head> */      font-family: 'Roboto', sans-serif;    }  </style>  </head>  <body>  <!-- In the callback, you would hide the gSignInWrapper element on a  successful sign in -->  <div id="gSignInWrapper">    <span class="label">Sign in with:</span>    <div id="customBtn" class="customGPlusSignIn">      <span class="icon"></span>      <span class="buttonText">Google</span>    </div>  </div>  <div id="name"></div>  <script>startApp();</script></body></html>
Comment

PREVIOUS NEXT
Code Example
Css :: mcq on advanced css 
Css :: COMO ADC HOVER 
Css :: how to pass html number to css 
Css :: only outline on keybord 
Css :: customHook-axios 
Css :: css input auto-correct color 
Css :: tsx css 
Css :: button two lines on ipad 
Css :: css selector 
Css :: option select css 
Css :: animated display css 
Css :: html click through image 
Css :: css border image repeat property 
Css :: calculadora 
Typescript :: flutter run code every second 
Typescript :: select elements id like jquery 
Typescript :: In order to allow non-dict objects to be serialized set the safe parameter to False. 
Typescript :: type of setinterval typescript 
Typescript :: client missing intents discord 
Typescript :: angular get url param 
Typescript :: react event typescript 
Typescript :: vue : File C:UsersMTP Nabeel AhmedAppDataRoaming pmvue.ps1 cannot be loaded because running scripts is disabled on this system. 
Typescript :: serenity.is LinkingSetRelation add column-picker-button 
Typescript :: vscode use relative paths in auto import 
Typescript :: Read file contents on module location 
Typescript :: Warning: initial exceeded maximum budget. angular 
Typescript :: mongoose project first element from array 
Typescript :: session not created: This version of ChromeDriver only supports Chrome version 85 
Typescript :: azure artifacts npm install latest version not updating 
Typescript :: typeorm find orderby 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =