getDefaultRedirectUri static method
Determine an appropriate redirect URI for AAD authentication. On web, it is the location that the application is being served from. On mobile, it is https://login.live.com/oauth20_desktop.srf
Implementation
static String getDefaultRedirectUri() {
if (kIsWeb) {
var base = Uri.base.toString();
final idx = base.indexOf('#');
if (idx != -1) {
base = base.substring(0, idx);
}
if (!base.endsWith('/')) {
base = base + '/';
}
return base;
} else {
return 'https://login.live.com/oauth20_desktop.srf';
}
}