summaryrefslogtreecommitdiff
path: root/ui/app/models/account.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/models/account.js')
-rw-r--r--ui/app/models/account.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/ui/app/models/account.js b/ui/app/models/account.js
index 3656d2c7..14773602 100644
--- a/ui/app/models/account.js
+++ b/ui/app/models/account.js
@@ -4,6 +4,7 @@
//
import bitmask from 'lib/bitmask'
+import Provider from 'models/provider'
export default class Account {
@@ -46,8 +47,17 @@ export default class Account {
return this._authenticated
}
- get hasEmail() {
- return true
+ getProvider() {
+ if (this.provider) {
+ return new Promise((resolve, reject) => {
+ resolve(this.provider)
+ })
+ } else {
+ return Provider.get(this.domain).then(provider => {
+ this.provider = provider
+ return provider
+ })
+ }
}
//