2020. 2. 10. 06:32ㆍ안드로이드 개발
https://developers.google.com/android-publisher/authorization
Authorization | Google Play Developer API | Google Developers
This section contains instructions specific to the Google Play Developer API. See the full OAuth2 documentation for more details. Initial configuration Access to the Google Play Android Developer API is authenticated using the OAuth 2.0 Web Server flow. Be
developers.google.com
[Node.js] google oauth 인증 (구글 로그인)
Node.js에서 google oauth 인증하는 방법이다. passport를 사용하는 방법이 있지만 passport는 사용해보니 무조건 session을 이용해야 했다.(아닐 수도 있음.) 이 글은 passport를 사용하지 않는 방법이다. 1.pass..
blog.wky.kr
var express = require('express');
var app = express();
const { google } = require('googleapis');
var googleClient = require('./config/google.json');
const googleConfig = {
clientId: googleClient.web.client_id,
clientSecret: googleClient.web.client_secret,
redirect: googleClient.web.redirect_uris[0]
};
const scopes = [
'https://www.googleapis.com/auth/plus.me'
];
const oauth2Client =new google.auth.OAuth2(
googleConfig.clientId,
googleConfig.clientSecret,
googleConfig.redirect
);
const url = oauth2Client.generateAuthUrl({
access_type:'offline',
scope: scopes
});
function getGooglePlusApi(auth) {
return google.plus({ version:'v1', auth });
}
asyncfunction googleLogin(code) {
const { tokens } = await oauth2Client.getToken(code);
oauth2Client.setCredentials(tokens);
oauth2Client.on('tokens', (tokens) => {
if(tokens.refresh_token){
console.log("리프레시 토큰 :", tokens.refresh_token);
}
console.log("액세스 토큰:", tokens.access_token);
});
const plus = getGooglePlusApi(oauth2Client);
const res = await plus.people.get({ userId:'me' });
console.log(`Hello ${res.data.displayName}! ${res.data.id}`);
return res.data.displayName;
}
app.get('/login',function (req, res) {
res.redirect(url);
});
app.get("/auth/google/callback", asyncfunction (req, res) {
const displayName = await googleLogin(req.query.code);
console.log(displayName);
res.redirect("http://localhost:3000");
});
app.get('/',function (req, res) {
res.send('Hello World!');
console.log("로그인 해서 홈으로 돌아옴");
});
app.listen(3000,function () {
console.log('Example app listening on port 3000!');
});
https://developers.google.com/android-publisher/api-ref/edits/apks/upload
Edits.apks: upload | Google Play Developer API | Google Developers
Note: Requires authorization. This method supports an /upload URI and accepts uploaded media with the following characteristics: Maximum file size: 1GB Accepted Media MIME types: application/octet-stream , application/vnd.android.package-archive Request HT
developers.google.com
Using node.js to upload your app to Google Play
If you're developing a hybrid mobile app, you may want to stick with node.js to upload your app to the Google Play Store. However, Google's node.js client is still in "alpha", and documentation is very limited. This post gives information about basic setup
frontendcollisionblog.com
https://github.com/googleapis/google-api-nodejs-client
googleapis/google-api-nodejs-client
Google's officially supported Node.js client library for accessing Google APIs. Support for authorization and authentication with OAuth 2.0, API Keys and JWT (Service Tokens) is included. - go...
github.com