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
Branches
No related tags found
1 merge request!1Mobile app initial implementation.
This commit is part of merge request !1. Comments created here will be created in the context of that merge request.
const String APP_HOST = "https://demo1.vereign.com"; const String APP_HOST = "https://demo1.vereign.com";
\ No newline at end of file
/* 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 { ...@@ -17,13 +17,6 @@ class Home extends StatefulWidget {
_HomeState createState() => _HomeState(); _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> { class _HomeState extends State<Home> {
@override @override
initState() { initState() {
...@@ -90,13 +83,13 @@ class _HomeState extends State<Home> { ...@@ -90,13 +83,13 @@ class _HomeState extends State<Home> {
startOAuth() { startOAuth() {
FlutterAppAuthWrapper.startAuth( FlutterAppAuthWrapper.startAuth(
AuthConfig( AuthConfig(
clientId: clientId, clientId: CLIENT_ID,
clientSecret: clientSecret, clientSecret: CLIENT_SECRET,
redirectUrl: redirectURL, redirectUrl: REDIRECT_URL,
state: "login", state: "login",
prompt: "consent", prompt: "consent",
endpoint: AuthEndpoint( endpoint: AuthEndpoint(
auth: authEndpoint, token: tokenEndpoint), auth: AUTH_ENDPOINT, token: TOKEN_ENDPOINT),
scopes: [ scopes: [
"user_account_status", "user_account_status",
"user_territory", "user_territory",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment