MetaMask / MetaMask/customauth-flutter-sdk

triggerLogin responses with partially nulled userInfo

Open
#15 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
9
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Hi there!

I'm using CustomAuth SDK from `master` branch with the `google` type of login.

I'm expect to fetch `userInfo` with correctly filled fields while using `triggerLogin`, at least `verifier` and `veriferId`, preferably `accessToken` and `idToken`, but I get it nulled.

```
final wallet = await CustomAuth.triggerLogin(
typeOfLogin: TorusLogin.google,
verifier: '***',
clientId: '***',
);
print('publicAddress = ${wallet.publicAddress}'); // publicAddress = ***
print('userInfo.email = ${wallet.userInfo[0].email}'); // userInfo.email = ***
print('userInfo.accessToken = ${wallet.userInfo[0].accessToken}'); // userInfo.accessToken = null
print('userInfo.idToken = ${wallet.userInfo[0].idToken}'); // userInfo.idToken = null
print('userInfo.verifier = ${wallet.userInfo[0].verifier}'); // userInfo.verifier = null
print('userInfo.verifierId = ${wallet.userInfo[0].verifierId}'); // userInfo.verifierId = null
```

At the same time redirect to the app executes with an url of the form of `/redirect#state=***&access_token=***&id_token&...`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the Google login flow through CustomAuth.triggerLogin and inspect the redirect URL and resulting userInfo values. Trace how the redirect response is converted into userInfo. Done means verifier and verifierId are populated, with accessToken and idToken preserved when present in the response.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
authentication, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.