简体   繁体   English

将 React 用作前端时,如何在 Ruby API 中访问用户的 Google 日历?

[英]How do I get access User's Google Calendar in my Ruby API when using it with React as a Frontend?

So, I am creating an app where I am using React as a Frontend and Rails as a Backend with Postgres database.所以,我正在创建一个应用程序,其中我使用 React 作为前端,Rails 作为后端和 Postgres 数据库。 I am using Google Oauth to authenticate users and also to get the access token so that I can make use of that access token to get User's Google Calendar Events.我正在使用 Google Oauth 对用户进行身份验证并获取访问令牌,以便我可以使用该访问令牌来获取用户的 Google 日历事件。 So, when the user Log's In to my app using Google Login, I will get the access token in React Frontend and then I will send it to the Ruby Backend API to store inside the user's table in access_token column.因此,当用户使用 Google 登录登录到我的应用程序时,我将在 React 前端获取访问令牌,然后将其发送到 Ruby 后端 API 以存储在用户表中的 access_token 列中。 So, what should I do next if I want that user's Calendar Events?那么,如果我想要该用户的日历事件,接下来应该怎么做?

I am not able to find any guide on this, so if anyone of you can help me with step by step procedure on what to do next then that will be great我找不到这方面的任何指南,所以如果你们中的任何人都可以帮助我逐步了解下一步该做什么,那就太好了

Thank you!谢谢!

You can you use google_calender gem.你可以使用google_calender gem。 Follow the configuration provided here .遵循此处提供的配置。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用databasedotcom ruby​​ gem访问Salesforce时,如何获取特定用户(或帐户)的ActivityHistory - When using databasedotcom ruby gem to access salesforce, how do I get the ActivityHistory for a particular User (or Account) 如何将我的反应前端 api 请求代理到同一来源的 Rails 后端? - How do I proxy my react frontend api requests to my rails backend on the same origin? 如何使用Drive API的Ruby客户端将文本写入Google文档? - How Do I Write Text to a Google Doc using Drive API's Ruby Client? 如何在我的项目中使用 React 前端文件夹实现设计? - How do I implement Devise with react frontend folder in my project? 尝试使用Ruby on Rails应用程序中的访问令牌查询Google Calendar API时出现无效的json错误 - Invalid json error when trying to query google calendar api with access token from Ruby on Rails application 使用Rails Omniauth gem和Google OpenID时,如何不要求用户发送电子邮件 - How do I NOT require user's email when using Rails Omniauth gem and Google OpenID 使用React前端进行AJAX调用时,无法使用CORS访问后端API - Can't access backend API using CORS when making a AJAX call using React frontend 如何使用ruby客户端访问包含siteURL的Google API方法? - How do I access Google API methods that include siteURL with the ruby client? 在使用OmniAuth时,如何指定用户的Facebook帐户需要哪些访问权限? - How can I specifiy what access I need from my user's Facebook accounts when using OmniAuth? 如何在 Ruby 中访问此哈希对象的属性? - How do I access this hash's object's attributes in Ruby?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM