PageSourceSearch

https://pharmamex.com.mx/includes/javascript/google_oauth.js

js pharmamex.com.mx collected 2026-10-04 02:39:53 UTC 1,256 bytes, 37 lines download raw bytes

1function googleStartAuth() {
2    gapi.load('auth2', function () {
3        auth2 = gapi.auth2.init({
4            client_id: googleClientID
5            // Scopes to request in addition to 'profile' and 'email'
6            //scope: 'additional_scope'
7        });
8        auth2.grantOfflineAccess().then(googleSignInCallback);
9    });
10}
11
12function googleSignInCallback(authResult) {
13    if(authResult['code']) {
14        $.ajax({
15            type: 'POST',
16            url: googleRedirectUri,
17            dataType: 'json',
18            data: {
19                code: authResult['code']
20            },
21            success: function (result) {
22                if(result.success) {
23                    checkLoginvk(result.id, result.firstname, result.lastname, result.picture, result.email, '', '');
24                }else {
25                    console.log(result.message);
26                }
27            }
28        });
29    }else {
30        console.log('Error google authResult');
31    }
32}
33function startGoogleOAuth() {
34    var script = '<script src="https://apis.google.com/js/client:platform.js?onload=googleStartAuth" async defer><\/script>';
35    $('body').append(script.replace(/&lt;/g, '<'));
36};
37$(document).on('click', '.googleSigninButton', startGoogleOAuth);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.