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

Redirect doesn't work? #219

Closed
sapoepsilon opened this issue Sep 27, 2022 · 1 comment
Closed

Redirect doesn't work? #219

sapoepsilon opened this issue Sep 27, 2022 · 1 comment

Comments

@sapoepsilon
Copy link

sapoepsilon commented Sep 27, 2022

Trying to use Installed app API. Created an app, installed url_launcher and uni_links. However, can't wrap my head how the redirect would work. Created a scheme myapp://auth as per instructions here. The redirect is not happening, hence the app is not opening after authentication.

I, also, tried to redirect to google.com, still no luck. Here's a little visual representation of me trying to redirect to google.com:
output-onlinegiftools

And this is my code:


  final redirectURI = "google.com"
  final reddit = Reddit.createInstalledFlowInstance(
    clientId: clientID,
    userAgent: userAgent,
    configUri: Uri.parse('draw.ini'),
    redirectUri: Uri.parse(redirectURI),
  );

  // Build the URL used for authentication. See `WebAuthenticator`
  // documentation for parameters.
  var uuid = Uuid();

  var state = uuid.v1();
  final auth_url = reddit.auth.url(["identity"], state, compactLogin: false);
@sapoepsilon
Copy link
Author

I was using wrong clientID. Instead, of using a clientID, I was using the app name.

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

1 participant