teranetsrl / oauth2_client

Simple Dart library for interacting with OAuth2 servers.
BSD 2-Clause "Simplified" License
91 stars 111 forks source link

Eventbrite api https redirect url problem #150

Open emil3time opened 1 year ago

emil3time commented 1 year ago

Hi I am trying to get an access token from Eventbrite API but I am not getting back to the app every time it redirects me to webView with the message "This site can't be reached". I can't use a custom redirect URL - the API requires HTTP or HTTPS so I use this: https://localhost:3000/callback .

my code in AndroidManifest

`

</activity>`  

my code

class EventbritteOAuth2Client extends OAuth2Client { EventbritteOAuth2Client({ required super.redirectUri, required super.customUriScheme, }) : super( authorizeUrl: 'https://www.eventbrite.com/oauth/authorize', tokenUrl: 'https://www.eventbrite.com/oauth/token', ); } ` EventbritteOAuth2Client client = EventbritteOAuth2Client( redirectUri: 'https://localhost:3000/callback', customUriScheme: 'https');

`

final response = await client.getTokenWithAuthCodeFlow(
  clientId: clientId,
  clientSecret: secret,
);