Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
Mobile App
Manage
Activity
Members
Labels
Plan
Issues
3
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Code
Mobile App
Commits
0f040d2d
Commit
0f040d2d
authored
5 years ago
by
igorwork
Committed by
Markin Igor
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Move creds to config
parent
7ca0e586
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1
Mobile app initial implementation.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/config.dart
+9
-1
9 additions, 1 deletion
lib/config.dart
lib/screens/home.dart
+4
-11
4 additions, 11 deletions
lib/screens/home.dart
with
13 additions
and
12 deletions
lib/config.dart
+
9
−
1
View file @
0f040d2d
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
This diff is collapsed.
Click to expand it.
lib/screens/home.dart
+
4
−
11
View file @
0f040d2d
...
...
@@ -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:
redirect
URL
,
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"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment