fixed #64
This commit is contained in:
parent
0263e1666d
commit
06bc4ceeb1
1 changed files with 5 additions and 1 deletions
|
@ -68,12 +68,17 @@ function(HostApp, Paths, Hmac) {
|
|||
Oauth.prototype.register = function (url) {
|
||||
var those = this;
|
||||
Paths.getURL(url, "GET", function(resp) {
|
||||
|
||||
those.profile = JSON.parse(resp.responseText);
|
||||
those.entity = those.profile["https://tent.io/types/info/core/v0.1.0"].entity;
|
||||
HostApp.setStringForKey(those.entity, "entity")
|
||||
HostApp.setStringForKey(those.apiRoot(), "api_root");
|
||||
|
||||
var callback = function(resp) {
|
||||
var data = JSON.parse(resp.responseText);
|
||||
those.authRequest(data);
|
||||
}
|
||||
|
||||
Paths.getURL(Paths.mkApiRootPath("/apps"), "POST", callback, JSON.stringify(those.app_info));
|
||||
});
|
||||
}
|
||||
|
@ -146,7 +151,6 @@ function(HostApp, Paths, Hmac) {
|
|||
HostApp.setStringForKey(access["token_type"], "user_token_type");
|
||||
|
||||
HostApp.loggedIn();
|
||||
console.log("D")
|
||||
}
|
||||
|
||||
Oauth.prototype.logout = function() {
|
||||
|
|
Reference in a new issue