Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Applications
android-components
Commits
6971977e
Commit
6971977e
authored
Jun 04, 2019
by
vladikoff
Committed by
Christian Sadilek
Jun 04, 2019
Browse files
Closes #3250: Switch FxA sample to production servers, fix pairing
parent
00032904
Changes
2
Hide whitespace changes
Inline
Side-by-side
docs/changelog.md
View file @
6971977e
...
...
@@ -17,6 +17,9 @@ permalink: /changelog/
to ensure that their view constraints will not be broken. We do this manually because autoResizeText
does not work with views that have a non-fixed height.
*
**samples-firefox-accounts**
*
Switch FxA sample to production servers, fix pairing.
# 0.55.0
*
[
Commits
](
https://github.com/mozilla-mobile/android-components/compare/v0.54.0...v0.55.0
)
...
...
samples/firefox-accounts/src/main/java/org/mozilla/samples/fxa/MainActivity.kt
View file @
6971977e
...
...
@@ -42,9 +42,9 @@ open class MainActivity : AppCompatActivity(), LoginFragment.OnLoginCompleteList
get
()
=
Dispatchers
.
Main
+
job
companion
object
{
const
val
CLIENT_ID
=
"
12cc4070a481bc73
"
const
val
REDIRECT_URL
=
"fxaclient://android.redirect
"
const
val
CONFIG_URL
=
"https://latest.dev.lcip.org
"
const
val
CLIENT_ID
=
"
3c49430b43dfba77
"
const
val
CONFIG_URL
=
"https://accounts.firefox.com
"
const
val
REDIRECT_URL
=
"$CONFIG_URL/oauth/success/3c49430b43dfba77
"
const
val
FXA_STATE_PREFS_KEY
=
"fxaAppState"
const
val
FXA_STATE_KEY
=
"fxaState"
private
const
val
REQUEST_CODE_CAMERA_PERMISSIONS
=
1
...
...
@@ -66,10 +66,8 @@ open class MainActivity : AppCompatActivity(), LoginFragment.OnLoginCompleteList
ActivityCompat
.
requestPermissions
(
this
,
permissions
,
REQUEST_CODE_CAMERA_PERMISSIONS
)
},
onScanResult
=
{
pairingUrl
->
val
config
=
Config
(
CONFIG_URL
,
CLIENT_ID
,
REDIRECT_URL
)
val
acct
=
FirefoxAccount
(
config
)
launch
{
val
url
=
acct
.
beginPairingFlowAsync
(
pairingUrl
,
scopes
).
await
()
val
url
=
acc
oun
t
.
beginPairingFlowAsync
(
pairingUrl
,
scopes
).
await
()
if
(
url
==
null
)
{
Log
.
log
(
Log
.
Priority
.
ERROR
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment