FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
118 stars 19 forks source link

Need Supabase package update #2940

Closed mdrashedbinkuddus closed 4 months ago

mdrashedbinkuddus commented 4 months ago

Has your issue been reported?

Current Behavior

I am trying to add supabase linkedin login. but for that I need to update "gotrue" package. In that package there is a enum called "Provider" which is now "OAuthProvider" and for likedin OAuth they need to set it to "OAuthProvider.linkedinOidc". So previous code is await SupaFlow.client.auth.signInWithOAuth(Provider.linkedin);

To solve that issue I need to update 5 package

But when I do that I get error in table.dart file

Expected Behavior

New code should be await SupaFlow.client.auth.signInWithOAuth(OAuthProvider.linkedinOidc);

Steps to Reproduce

  1. Create a Custom Function
  2. Add package gotrue latest version
  3. Add the following code

import '/backend/supabase/supabase.dart'; import 'package:flutter/material.dart'; import 'dart:async'; import 'package:flutter/foundation.dart'; import 'package:flutter/widgets.dart'; // Import widgets to access Uri.base

Future linkedInLogin(BuildContext context) async { // Add your function code here! Uri currentUri = Uri.base; String redirectUrl = '${currentUri.scheme}://${currentUri.host}:${currentUri.port}/';

if (kIsWeb) { await SupaFlow.client.auth.signInWithOAuth(Provider.linkedin, redirectTo: redirectUrl); }

final completer = Completer<User?>();

SupaFlow.client.auth.onAuthStateChange.listen((data) { final AuthChangeEvent event = data.event; if (event == AuthChangeEvent.signedIn) { completer.complete(SupaFlow.client.auth.currentUser); } });

await Future.delayed(const Duration(seconds: 10)); if (!completer.isCompleted) { completer.complete(null); // In case it times out, return null. }

return completer.future; }


### Reproducible from Blank

- [X] The steps to reproduce above start from a blank project.

### Bug Report Code (Required)

IT4Ck+fqxIt2j7xY+KrTbcBvmicXQkB/RY0NiO1hUQkYN5POD7AQP8nRP1dUcMzgdHxYIGG0in4X/MrTj/HIVsIFORyuRrZzyMx2SxX/fDmmVpCJCoS3b3clRNFXGhWH0KSRnCJAFPFpR1o+3EOYHOuRVjXXQ6X7DDIeQ+a4XdeK2SrDX1iXc2URm05KZDPz

### Context

I want to implement Linkedin login using Supabase. Everything was working when I do it on my local dev. But when I use custom action I get the error

### Visual documentation

https://www.loom.com/share/a16018232f9b487794728eb66bad6824

### Additional Info

_No response_

### Environment

```markdown
- FlutterFlow version: v4.1.53+
- Platform: Web
- Browser name and version: Chrome
- Operating system and version affected: Windows Desktop

General

Relative to the time the changes were made, data was lost within

When following my steps to reproduce, data loss happens

paulperez-dev commented 4 months ago

Hi @mdrashedbinkuddus! This tracker is only used for bugs, so I am closing this issue. I've added this as a feature request in our internal backlog and we will get to it as soon as possible. Thanks for your feedback!

webdevppl commented 3 weeks ago

I am also facing the same issue. Any updates on this? Still we can't use the "OAuthProvider.linkedinOidc".