在Fitbit OAuth 2.0中使用react-native-app-auth插件 [英] Using react-native-app-auth plugin with Fitbit OAuth 2.0

查看:172
本文介绍了在Fitbit OAuth 2.0中使用react-native-app-auth插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试与Fitbit集成的移动应用程序.在文档中,我注意到Fitbit OAuth 2.0需要打开用于身份验证过程的浏览器窗口,否则应用程序将被Fitbit禁止.在npm上检查了用于处理OAuth 2.0的多个程序包后,我找到了react-native-app-auth.

I am working on a mobile app I am trying to integrate with Fitbit. In the documentation, I noticed that Fitbit OAuth 2.0 requires a browser window be opened for the authentication process or else an app would be banned from Fitbit. After reviewing several packages on npm for handling OAuth 2.0, I found react-native-app-auth.

react-native-app-auth功能是否确保不违反此Fitbit规则?这对我来说有些混乱,因为这是一个移动应用程序.我真的很想使用此插件,但要确保不禁止Fitbit禁止我的应用程序.

Does react-native-app-auth function in a way that makes sure this Fitbit rule is not violated? This is somewhat confusing for me in that this is a mobile app. I would really like to use this plugin but want to make sure my app is not banned from Fitbit.

推荐答案

如今,移动登录的事实上的标准是插入Google AppAuth库,该库通过InApp浏览器处理登录.这些窗口在实际的移动应用程序外部,并且从安全性和可用性的角度都建议使用:

Pretty much the de facto standard for mobile logins these days is to plug in the Google AppAuth libraries, which handle logins via InApp browsers. These windows are external to the actual mobile app, and are recommended from both a security and usability viewpoint:

AppAuth Android

React Native具有 bridge 来集成这些库,但这是不幸的是,这并不平凡.

React Native has a bridge to integrate these libraries, but this is not trivial unfortunately.

虽然我不了解FitBit,但禁止在Web视图上登录已变得非常普遍,而且我很确定使用基于AppAuth的库可以使您摆脱此障碍.

While I don't know FitBit, it has become quite common for logins on a web view to be banned, and I'm pretty sure that using AppAuth based libraries would get you past this blocker.

加里

PS.除了编写任何代码外,一个不错的下一步可能是将实际的AppAuth示例指向FitBit,以检查登录是否正常.我有一些帖子可能对此有所帮助:

PS. Rather than writing any code, a good next step might be to point the actual AppAuth samples at FitBit, to check that logins work OK. I have some posts that might help with this:

  • Running iOS AppAuth sample
  • Running Android AppAuth sample

如果我没记错的话,您只需要下载示例,然后配置3个字段以指向FitBit:

If I'm not mistaken you'll just need to download the samples, then configure 3 fields to point to FitBit:

  • 权限
  • 客户ID
  • 重定向URI

我的文章是用Okta编写的,但是登录名应该适用于任何基于开放标准的提供商.

My write ups are in terms of Okta, but logins should work for any open standards based provider.

这篇关于在Fitbit OAuth 2.0中使用react-native-app-auth插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆