Coder Social home page Coder Social logo

auth's People

Contributors

andrious avatar drawner avatar themisir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

auth's Issues

Support for Azure AD

Is there support for Azure AD. if it is avaialbe can anyone post a sample code for Azure AD

Flutter facebook login uses deprecated Api

Hi - the plugin that you use for Facebook login uses a deprecated API - UIWebView. This has been deprecated since April 2020, meaning any NEW apps submitted after this date will be rejected. It will be great if we have a choice to use a native facebook solution or your old web flow approach.

Unable to sign in with Google

auth: ^7.3.2
[√] Flutter (Channel stable, 1.22.6, on Microsoft Windows [Version 10.0.19042.804], locale en-US)

I'm unable to sign in with Google while using your example code. (To be fair,) I'm wedging it into my existing application.

The first thing I noticed was that this:

auth = Auth.init(
      scopes: [
        'email',
...

was telling me The method 'init' isn't defined for the type 'Auth', which I thought was strange. So, I removed .init, and moved on.

Next, I plopped your code into my sign-in page.

RaisedButton(
  onPressed: () {
    auth
        .signInWithGoogle()
        .then((signIn) => signInFunc(signIn: signIn))
        .catchError((Object err) {
      if (err is! Exception) {
        err = err.toString();
      }
      errorMessage = auth.message;
    });
  },
  child: const Text('Sign In With Google'),
),

The app compiles and runs, but when I tap the Sign In With Google button, I get the following error:

MissingPluginException(No implementation found for method init on channel plugins.flutter.io/google_sign_in)

I didn't have google_sign_in in my pubspec.yaml, so I added it thinking that might be the problem, but it hasn't helped.

Any suggestions?

Google SignIn

Hi i'm trying to sign in with google and this error appears

"The method 'signIn' isn't defined for the class 'Auth'.
Try correcting the name to the name of an existing method, or defining a method named 'signIn'"

SignInWithGoogle crashes on Android

I'm getting this exception on android 9.0 with latest version of this plugin:
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/lifecycle/LifecycleEventObserver;
E/AndroidRuntime( 3132): at java.lang.Class.newInstance(Native Method)
E/AndroidRuntime( 3132): at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:69)
E/AndroidRuntime( 3132): at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:43)
E/AndroidRuntime( 3132): at android.app.Instrumentation.newActivity(Instrumentation.java:1215)
E/AndroidRuntime( 3132): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3007)
E/AndroidRuntime( 3132): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3256)
E/AndroidRuntime( 3132): at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
E/AndroidRuntime( 3132): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
E/AndroidRuntime( 3132): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
E/AndroidRuntime( 3132): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1947)
E/AndroidRuntime( 3132): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime( 3132): at android.os.Looper.loop(Looper.java:214)
E/AndroidRuntime( 3132): at android.app.ActivityThread.main(ActivityThread.java:7037)
E/AndroidRuntime( 3132): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 3132): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
E/AndroidRuntime( 3132): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
E/AndroidRuntime( 3132): Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.lifecycle.LifecycleEventObserver" on path: DexPathList[[zip file "/data/app/com.guala.koalarm-ZHyc8QrMaukWx9JlaxDelw==/base.apk"],nativeLibraryDirectories=[/data/app/com.guala.koalarm-ZHyc8QrMaukWx9JlaxDelw==/lib/arm64, /data/app/com.guala.koalarm-ZHyc8QrMaukWx9JlaxDelw==/base.apk!/lib/arm64-v8a, /system/lib64]]

Isn't flutter_facebook_login abandoned?

Its build is failing on pub.dev, hasn't been updated to support the new Facebook SDK, and if you try to submit an app to the App store it will get rejected for using "UIWebView" (Which flutter_facebook_login uses).

auth dependency does not resolve

I added auth: ^3.2.0 to my pubspec and added the import in my file like this:
import 'package:auth/auth.dart'

I create a reference Auth _auth; I used later in my init code _auth = Auth.init(...
Not any of these references resolve. I use already google sign in and firebase in that project.
Then I created a blank project and added the reference - same problem.

'error: Target of URI doesn't exist: 'package:auth/auth.dart'. (uri_does_not_exist at [elm_bluetooth_bloc] lib\bloc\login\login_bloc.dart:3)'
'error: Undefined class 'Auth'. (undefined_class at [elm_bluetooth_bloc] lib\bloc\login\login_bloc.dart:10)'

If I just copy the two files from your project all resolves fine.

C:\Projects>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.7.8+hotfix.4, on Microsoft Windows [Version 10.0.18362.295], locale en-US)

[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Android Studio (version 3.5)
[√] IntelliJ IDEA Community Edition (version 2017.3)
[√] VS Code, 32-bit edition (version 1.30.1)
[√] Connected device (2 available)

`Auth.isEmailVerified` not returning true

Hello!

I have a user create an account using Auth.createUserWithEmailAndPassword
Auth.isEmailVerified returns false.
I then send an email verification

Auth.sendEmailVerification();

The user then clicks on the email verification.

Auth.isEmailVerified still returns false.

Any ideas?

Version conflict

Because auth >=7.3.2 depends on firebase_core >=0.7.0 <1.0.0 and auth >=7.0.0 <7.3.2 depends on firebase_auth ^0.18.0, auth >=7.0.0 requires firebase_core >=0.7.0 <1.0.0 or firebase_auth ^0.18.0.
And because ... depends on auth ^7.0.0, either firebase_core >=0.7.0 <1.0.0 or firebase_auth ^0.18.0.
So, because ... depends on both firebase_auth ^1.0.0 and firebase_core ^1.0.0, version solving failed.
pub finished with exit code 1

Trying to bring back and save info to Firestore

Hi, would it be possible to guide after authentication, I would like get the ID as reference to create more details of the user and send it back again to firestore with more details. Been studying on google auth + firebase. For this how will I? I know my question is a hell stupid, im self studying on this. Thanks...

Release build fails due flutter_twitter dependency

Hello, app build is failing in release mode due to flutter_twitter dependency. There is no problem in debug mode.

`flutter run --release
Launching lib\main.dart on MYA L41 in release mode...

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':flutter_twitter:verifyReleaseResources'.

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource linking failed
C:\Users\ASUS.gradle\caches\transforms-2\files-2.1\4b381a4f7d559d64bcbc7773e0474fc4\core-1.0.0\res\values\values.xml:57:5-88:25
: AAPT: error: resource android:attr/fontVariationSettings not found.

 C:\Users\ASUS\.gradle\caches\transforms-2\files-2.1\4b381a4f7d559d64bcbc7773e0474fc4\core-1.0.0\res\values\values.xml:57:5-88:25

: AAPT: error: resource android:attr/ttcIndex not found.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get
    full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1m 12s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 73.3s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the
incompatibility.
Building plugin cloud_firestore...
The plugin cloud_firestore could not be built due to the issue above.
Running Gradle task 'assembleAarRelease'... `

Error: Getter not found: 'Success'.

I started to get this error although I did not update any dependency. Flutter clean did not work.

Running Gradle task 'assembleDebug'...
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/auth-7.3.0/lib/src/auth.dart:1009:50: Error: Getter not found: 'Success'.
        if (result.status == FacebookLoginStatus.Success) {
                                                 ^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/auth-7.3.0/lib/src/auth.dart:1012:57: Error: Getter not found: 'Cancel'.
        } else if (result.status == FacebookLoginStatus.Cancel) {
                                                        ^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/auth-7.3.0/lib/src/auth.dart:1015:57: Error: Getter not found: 'Error'.
        } else if (result.status == FacebookLoginStatus.Error) {
                                                        ^^^^^


FAILURE: Build failed with an exception.

This issue also happens on pub.dev in static analysis.

Twitter callback URL does not fire

Thanks for the plugin. I see you have updated both Facebook and twitter to handle the deprecated API'S. In using TWITTER - I get my TWITTER login showing but after I authenticate - my app is not returned to.

I just get stuck on :

image

Twitter has been configured properly and I have these callbacks :

image

info.plist has also been setup with the twitter key in UrlSchemes :

image

My project is an OBJ-C iOS project using default AppDelegate.

Is there anything else that needs to be configured to get the twitter callback redirecting back to my app with your plugin ?

Auth not returning Google Sign in Info

Hello!
This file used to be able to return Auth.email and other Auth functions once await Auth.logInWithGoogle() was used.

I'm not sure if there was an update or not but as it is now, everything is returned as null once logged in via Auth.logInWithGoogle.

Any ideas?

Support firebase_auth ^0.20.0

Because auth 7.3.1 depends on firebase_auth ^0.18.0 and no versions of auth match >7.3.1 <8.0.0, auth ^7.3.1 requires firebase_auth ^0.18.0.

Error: Type 'Auth' not found.

Hi can't get this working. Compiling my flutter always gives
'Error: Type 'Auth' not found.'
Even though I included the dependency auth:
Thanks!

flutter_facebook_login instead of facebook web view login

Hello, thanks for the great library.
Is it possible to make use of flutter_facebook_login or implement similar behavior instead of Facebook web view login? Because, in web view login, user has to write email and password manually and as far as I know it will not be auto filled next time user tries to login.

Trying to login with google and facebook

hi i'm new to flutter, when i try to login with google everything okay but if i try login with the same email on facebook this error appear "ERROR_ACCOUNT_EXISTS_WITH_DIFFERENT_CREDENTIAL" on the debug console but i cannot catch the error or the exception on ths part:

`auth.signInWithFacebook().then(signInFunc).catchError((err,stackTrace) {
auth.currentUser();

                                  debugPrint(err);

                                    print('error caught: $err');
                                 // if (err is! Exception) err = err.toString();
                                  //errorMessage = auth.message;
                                });`

how can i catch the exception?

Breaking changes in google sign in plugin

Hi Greg,

Thanks for another great package from you.
I have just tried the Auth package but encountered the following error.

image

It looks like there is some braking changes in google sign in plug in.

Could you please take a look?

Thanks again.

Are the examples up to date?

I can't get this lib to work using an the example or the screenshots on pub.dev.
I get the very basic error: Type 'Auth' not found even though I imported the library like this:
import 'package:auth/auth.dart' if (dart.library.html) 'package:auth/auth_web.dart';
Are the examples up to date?

Problem with Google Signin

Hello,

Thank you for the great package again.

I have a problem with google signin. I am trying to use the signInWithGoogle method.

I had to modify the auth.dart file to print the following exception:
PlatformException(exception, Unknown signInOption, null)

Gist link for the signin page:
https://gist.github.com/deadsoul44/f95c72c3d7a3529d4ac2efce751a3866

I am able to get the google user account with the "vanilla" google signin.

Stacktrace:
I/flutter (20513): Caught: PlatformException(exception, Unknown signInOption, null) I/flutter (20513): Stack: #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7) I/flutter (20513): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:316:33) I/flutter (20513): <asynchronous suspension> I/flutter (20513): #2 MethodChannelGoogleSignIn.init (package:google_sign_in_platform_interface/src/method_channel_google_sign_in.dart:26:20) I/flutter (20513): #3 GoogleSignIn._ensureInitialized (package:google_sign_in/google_sign_in.dart:228:62) I/flutter (20513): #4 GoogleSignIn._callMethod (package:google_sign_in/google_sign_in.dart:210:11) I/flutter (20513): <asynchronous suspension> I/flutter (20513): #5 GoogleSignIn._addMethodCall (package:google_sign_in/google_sign_in.dart:266:18) I/flutter (20513): <asynchronous suspension> I/flutter (20513): #6 GoogleSignIn.signIn (package:google_sign_in/google_sign_in.dart:336:9) I/flutter (20513): #7 Auth.signInWithGoogle (package:auth/auth.dart:686:43) I/flutter (20513): #8 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:43:6) I/flutter (20513): #9 Auth.signInWithGoogle (package:auth/auth.dart:674:32) I/flutter (20513): #10 _LoginPageState.build.<anonymous closure>

As a workaround, I tried to initialize the auth with explicitly defining signInOption and it worked:
auth = Auth.init( signInOption: SignInOption.standard, scopes: [ 'email', 'https://www.googleapis.com/auth/contacts.readonly', ], );

Firebase Auth breaking change - code below to fix

/// Changed from _fireBaseAuth?.updateProfile(userUpdateInfo) to _user?.updateProfile(userUpdateInfo)
static Future updateProfile(UserUpdateInfo userUpdateInfo) =>
_user?.updateProfile(userUpdateInfo);

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.