Skip to content

Commit

Permalink
chore: Set more precise scopes required for the OAuth application (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
FlutterOd committed Dec 29, 2023
1 parent d68d399 commit 2e79c89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ Widget build(BuildContext context) {

For [OAuth App](https://support.crowdin.com/creating-oauth-app/) the redirect URL should match your app scheme.
For example, for scheme `<data android:scheme="crowdintest" />`, redirect URL in Crowdin should be `crowdintest://`.
Specify `project.translation` scope for the OAuth app on Crowdin.

For Android app, declare the following intent filter in `android/app/src/main/AndroidManifest.xml`:

Expand Down
2 changes: 1 addition & 1 deletion lib/src/real_time_preview/crowdin_oauth.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class CrowdinOauth {

var authorizationUrl = grant.getAuthorizationUrl(
Uri.parse(config.redirectUri),
scopes: ['project', 'tm']);
scopes: ['project.translation']);

_sub = uriLinkStream.listen((Uri? uri) async {
if (uri != null && uri.toString().startsWith(config.redirectUri)) {
Expand Down

0 comments on commit 2e79c89

Please sign in to comment.