What is a superior method for implementing Notion OAuth in Flutter?

Notion’s OAuth API requires HTTPS redirect URLs. In my Flutter Android app, I use tabs with dynamic links, yet parameters are missing. What alternative can capture the OAuth response?

In my experience a robust alternative to using dynamic links is to integrate an embedded webview that monitors URL changes for a secure redirection back to your app. This approach bypasses some of the issues with missing parameters. Additionally, leveraging Flutter packages like flutter_appauth can simplify and secure the OAuth handshake with proper PKCE support. Using this method, you gain more control over the redirection process, ensuring that the Notion OAuth flow returns complete data. This setup has proven reliable and easier to debug during development in both Android and iOS platforms.

In my view, leveraging a third-party package like flutter_web_auth can provide a more reliable and straightforward solution to manage Notion OAuth in Flutter. I encountered similar challenges with dynamic links, particularly missing parameters, so I switched to a browser-based authentication flow. With flutter_web_auth, I was able to capture the complete OAuth response via a custom scheme, which simplified the overall process. This method also offered better debugging capabilities and flexibility across both Android and iOS platforms. Based on my experience, this alternative can potentially offer a smoother integration for your app.

hey, try using an in-app browser with a custom scheme deep link instead of dynamic links. i found it mroe reliable for catching oauth responses- works good on both os. check it out.