Mail Server Solution(7)Meteor and Email/Auth Summary

本文总结了在混合应用中集成Gmail API遇到的问题及解决方案,包括使用Meteor插件进行Google AUTH集成的方法、直接设置访问令牌调用Gmail API的方式、以及原生应用如何配置并直接请求获取访问令牌等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Mail Server Solution(7)Meteor and Email/Auth Summary

First of all, I did not make auth/gmail API working on hybrid applications.

I do have some summary, so list all of them here.

1. Meteor Current Plugin
It seems that meteor is doing nodeJS server side integration with google AUTH.
Npm.require(‘googleapis’);
https://github.com/cscott/meteor-googleapis/blob/master/googleapis.js

2. How to delete Meteor Remote MongoDB
>meteor deploy test.meteor.com - - delete
>meteor deploy test.meteor.com

3. What JavaScript API Can Do
Based on
gapi.auth.setToken({
access_token: “token"
});

detail about the token object
https://developers.google.com/+/web/api/javascript#oauth_20_token_object

We can directly set the access token to gapi and directly call gmail API.
http://stackoverflow.com/questions/21168688/google-oauth2-using-externally-generated-access-token-with-js-client-library

But this is working only on web browser, not on hybrid.

OAuth Sample
It will show us how to do OAUTH2 on javascript client, the same thing, it will only work on web browser, not on hybrid.
https://github.com/google/google-api-javascript-client/edit/master/samples/authSample.html

The different thing here from my understanding between browser and hybrid. Browser is loading all the Javascript from on domain web site, hybrid is loading local files.

4. What Native Application Can Do
iOS application can configure its bundle and other information on google, directly send the auth request to google and get access token, no domain name, no redirect.
https://developers.google.com/+/mobile/ios/samples/quickstart-ios

Android does the same thing, configure its package name and sign the things on google, directly send the requests to google, no domain name, no redirect.
https://developers.google.com/+/mobile/android/samples/quickstart-android

5. What Hybrid Plugin Can Do
https://github.com/sujith3g/meteor-cordova-google-plus/
https://github.com/aquto/cordova-plugin-googleLogin
https://atmospherejs.com/hedcet/cordova-google-plus-native-sign-in

There is plugin for native login, but no for gmail. If we do, we need investigate this ourselves.


Google Developer Website
https://console.developers.google.com

Client and Server Side Routing
http://iron-meteor.github.io/iron-router/

Mock HTTP POST Server
http://requestb.in/

References:
http://sillycat.iteye.com/blog/2236155

UI router
http://angular-meteor.com/tutorials/angular1/routing-and-multiple-views
http://iron-meteor.github.io/iron-router/

include the library
http://stackoverflow.com/questions/22723300/how-do-you-include-3rd-party-javascript-libraries-in-meteor-js

angular and gmail api
https://github.com/maximepvrt/angular-google-gapi
http://stackoverflow.com/questions/12874491/why-is-gapi-client-from-google-plus-api-undefined

google multiple accounts
http://stackoverflow.com/questions/18036774/google-oauth-google-api-with-multiple-account
https://developers.google.com/identity/protocols/OAuth2UserAgent?hl=ru
http://stackoverflow.com/questions/13366254/is-it-possible-to-be-able-to-correctly-select-any-available-google-account-to-us
https://developers.google.com/api-client-library/javascript/reference/referencedocs#gapiauthauthorizeparams--------callback
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值