Is there a nice way in trigger.io to handle OAuth?

北城以北 提交于 2019-12-10 04:19:33

问题


In my case I would have a re-direct URL with a custom url schema like myapp://oauth

So first I would forward to my oauth login url and then I need to register an event handler for the location change to check if it matches my re-direct url.


回答1:


Yes, we have an example of how to handle oauth2

Using forge.tabs.openWithOptions, you can specify a url to open in a child browser, and a pattern to monitor for to trigger the child browser to close and return the parameters. So you can specify a redirect_url that will match that pattern.

Update: if you want to use Facebook for authentication we've now integrated the native Facebook SDK so you can do authentication with the forge.facebook module: http://docs.trigger.io/en/v1.4/modules/facebook.html#modules-facebook



来源:https://stackoverflow.com/questions/10457550/is-there-a-nice-way-in-trigger-io-to-handle-oauth

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!