Having Problem after auth.login and restart application
jitendravn opened this issue · comments
Caution
flutter: error : FormatException: Unexpected character (at character 1)
Instance of 'User'
^
Error come from
@override
boot(Nylo nylo) async {
await event<SyncAuthToBackpackEvent>();
return nylo;
}
@override
afterBoot(Nylo nylo) async {}
}
Hi @jitendravn,
Which Model
are you trying to auth?
By default, Nylo will expect the model to be of Type User
@agordn52 User
Hi @jitendravn,
In your User
model have you correctly set up toJson
?
Also, in your decoders.dart
file have you implemented a User
decoder?
@agordn52 But I'm Using Freezed for model
@agordn52 But I'm Using Freezed for model
You need to implement a 'decoder' for the model and have a 'toJson' method if you want to use Auth in Nylo.
For now I have removed Freezed from my User model class
i have implemented this
class User extends Model{}