Code Monkey home page Code Monkey logo

Comments (8)

whxpro avatar whxpro commented on August 16, 2024

+1, 大佬帮看下 @CarGuo

from gsy_github_app_flutter.

CarGuo avatar CarGuo commented on August 16, 2024

确实,很奇怪,iOS 在最终重定向的时候可以跳过去,android 就不行····

from gsy_github_app_flutter.

CarGuo avatar CarGuo commented on August 16, 2024

目前已知情况,通过 shouldOverrideUrlLoading 的方式去拦截新的 github picker user 的时候, android 无法正常跳转

from gsy_github_app_flutter.

CarGuo avatar CarGuo commented on August 16, 2024

👆暂时换个方式解决,还没时间深入探讨下为什么 shouldOverrideUrlLoading 的方式在 android 上有问题

from gsy_github_app_flutter.

CarGuo avatar CarGuo commented on August 16, 2024

目前简单测试了下,有个奇怪问题,就是单纯用 flutter webview 的 demo 不会出现 continue 的页面,但是 gsy 里会有,有点不理解

from gsy_github_app_flutter.

CarGuo avatar CarGuo commented on August 16, 2024

https://github.blog/changelog/2024-06-07-account-picker-updates-for-oauth-and-github-app-sign-in/

from gsy_github_app_flutter.

CarGuo avatar CarGuo commented on August 16, 2024

实验之后得到一个比较有趣的情况

下面这种,redirect_uri 和注册 oauth app 时相同的时候,会进入 select_account 页面 的 url

'prompt=select_account&redirect_uri=gsygithubapp://authed

下面这种,redirect_uri 和注册 oauth app 时不同的时候,不进入 select_account 页面 的 url

'prompt=select_account&redirect_uri=mygithubpage://authed

下面这种,没有 redirect_uri 和注册 oauth app 时不同的时候

'prompt=select_account'

备注

另外 'prompt=select_account' 其实并没有起到作用,目前看官方 api 行为还是挺怪异,进入 select_account 页面的 url ,在 continue 的时候,flutter 在 android webview 的回调里触发不了注册时的 gsygithubapp://authed

from gsy_github_app_flutter.

CarGuo avatar CarGuo commented on August 16, 2024

官方的 flutter webview 在 shouldOverrideUrlLoading 的处理上,是将 url 返回到 dart 层判定,触发 loadUrl 再回到 java 层 webview 重新加载,看起来是此时导致的 continue 的 url 进行 302 重定失败,导致一直死循环,无法进入 oauth url

image

from gsy_github_app_flutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.