Skip to content
Snippets Groups Projects
Commit 0f040d2d authored by igorwork's avatar igorwork Committed by Markin Igor
Browse files

Move creds to config

parent 7ca0e586
No related branches found
No related tags found
1 merge request!1Mobile app initial implementation.
const String APP_HOST = "https://demo1.vereign.com";
\ No newline at end of file
const String APP_HOST = "https://demo1.vereign.com";
/* OAuth */
const String CLIENT_ID = "123123";
const String CLIENT_SECRET = "123123";
const String REDIRECT_URL = "app://com.vereign.app/oauth2";
const String AUTH_ENDPOINT = "$APP_HOST/api/oauth2/authorize";
const String TOKEN_ENDPOINT = "$APP_HOST/api/oauth2/token";
\ No newline at end of file
......@@ -17,13 +17,6 @@ class Home extends StatefulWidget {
_HomeState createState() => _HomeState();
}
String clientId = "222222";
String clientSecret = "22222222";
String redirectURL = "app://com.vereign.app/oauth2";
String authEndpoint = "$APP_HOST/api/oauth2/authorize";
String tokenEndpoint = "$APP_HOST/api/oauth2/token";
class _HomeState extends State<Home> {
@override
initState() {
......@@ -90,13 +83,13 @@ class _HomeState extends State<Home> {
startOAuth() {
FlutterAppAuthWrapper.startAuth(
AuthConfig(
clientId: clientId,
clientSecret: clientSecret,
redirectUrl: redirectURL,
clientId: CLIENT_ID,
clientSecret: CLIENT_SECRET,
redirectUrl: REDIRECT_URL,
state: "login",
prompt: "consent",
endpoint: AuthEndpoint(
auth: authEndpoint, token: tokenEndpoint),
auth: AUTH_ENDPOINT, token: TOKEN_ENDPOINT),
scopes: [
"user_account_status",
"user_territory",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment