尝试在Postman中连接Google Oath2

我们有一个教育G Suite。我想为我们的每个学生创建一个新的Gmail用户。

enabled Gmail as told in this documentation并下载了certificate.json文件。

然后我打开POSTMAN并为此URL创建了一个发布请求:

// ==UserScript==
// @name         Flickr Max NewTab
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Open Max sized flickr image in a new tab using key shorcut
// @author       Newbie
// @include     /flickr\.com/
// @grant       GM_openInTab
// @require     https://code.jquery.com/jquery-3.3.1.min.js
// ==/UserScript==

var page ='';
var sizes = [];
var links = [];
var length = 0;
var mainurl = '';

function geturl() { // function used to get the link of biggest image
    var action = function (sourceCode) {
        sizes = sourceCode.match(/modelExport: {.+?"sizes":{.+?}}/i); // extract the part of html that containes modelExport:
        links = sizes[0].match(/"displayUrl":"[^"]+"/ig); // extract the urls dictionary from the dictionary modelExport:
        length = links.length; //get the length of the dictionary "links"
        // extract the last(biggest) url from the links dictionary and put them in an array "links"
        mainurl = links[links.length-1].replace(/"displayUrl":"([^"]+)"/i,"$1").replace(/\\/g,"").replace(/(_[a-z])\.([a-z]{3,4})/i,'$1' + "." + '$2');
    }
    $.get(document.URL,action);
}

function log(x) {
    console.log(x);
}
// function used to get to run the url grabber everytime you change the image in slideshow using arrowkeys
function navigation (e) {
    if (e.keyCode == 37 || e.keyCode == 39) {
        geturl();
        log(mainurl);// log to check the current contents of mainurl
    }
}
// function used to open image in a newtab when "alt + Q" are pressed
function newtab (e) {
    if (e.altKey && e.keyCode == 81) {
        GM_openInTab(mainurl);
    }
}

geturl(); //run the function

document.addEventListener('keyup',navigation);
document.addEventListener('keydown',newtab);

我使用了来自凭单的参数。

https://accounts.google.com/o/oauth2/v2/auth

响应是登录页面的html。 我尝试使用令牌 id_token 而不是代码,但是响应显示为unsupported_response_type。

我想做的是使用以下请求创建用户,即要求登录。

client_id: (as in json file)
response_type: code 
scope: openid%20email
redirect_api: http://localhost

我走错了方向吗?

q382206646 回答:尝试在Postman中连接Google Oath2

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3159302.html

大家都在问