Casdoor Flutter Sdk Test

Step 1: Clone casdoor-flutter-example from Github

Link: https://github.com/casdoor/casdoor-flutter-example

Step 2: Test in Chrome(Web)

Encountered a cross-domain problem. So the token could not be obtained.

1
2
3
// cross-domain code
// Post: localhost -> door.casdoor.com
final response = await _casdoor.requestOauthAccessToken(code);

Error:

截屏2022-11-26 14.12.45

Step 3: Test in Android Emulator

Android app can get a Token. But the automatic jump from browser back to App cannot be triggered. (Perhaps the emulator causes this bug)

Graphic:

截屏2022-11-26 14.41.25

Step 4: Test in IOS Emulator

Working well.

截屏2022-11-26 15.38.58