Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not an issue but please share a working flutter app code for the authentication flow in example #5

Open
tariqph opened this issue Feb 18, 2022 · 4 comments

Comments

@tariqph
Copy link

tariqph commented Feb 18, 2022

I've tried to use your package to get a flutter app working with the auth flow for splitwise but could not get it to work. So if you have a working example app with the auth flow, could you please share along with any changes in AndoroidManifest as well.

@srthkpthk
Copy link
Owner

sure @tariqph

@tariqph
Copy link
Author

tariqph commented Mar 3, 2022

Any updates on this?

@srthkpthk
Copy link
Owner

srthkpthk commented Mar 4, 2022

  SplitWiseService splitWiseService = SplitWiseService.initialize(
        'consumer key',
        'consumer secret');
    var authURL = await splitWiseService.validateClient();
    print(authURL);
    print('auth url navigate to do authorization');
    //This Will print the token and also return them save them to Shared Prefs

    TokensHelper tokens =
        await splitWiseService.validateClient(verifier:
        //input from splitwise website 
        );

    splitWiseService.validateClient(tokens: tokens);
    //Example
    var currentUserEntity = await splitWiseService.getCurrentUser();
    print(currentUserEntity.user.firstName);

@srthkpthk
Copy link
Owner

hi @tariqph thanks for pointing it out example app's example is wrong , i will update this weekend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants