Specify the expiration on the client. Currently this is 100 years.

I am not sure if this is the best approach, or if we should introduce a magic value instead.
This commit is contained in:
Johannes Zellner
2016-06-07 15:54:30 +02:00
parent facdabcc8d
commit 17d48f3fce
2 changed files with 5 additions and 3 deletions

View File

@@ -239,7 +239,9 @@ angular.module('Application').controller('AccountController', ['$scope', '$locat
$scope.tokenAdd.busy = true;
$scope.tokenAdd.token = {};
Client.createTokenByClientId(client.id, function (error, result) {
var expiresAt = Date.now() + 100 * 365 * 24 * 60 * 60 * 1000; // ~100 years from now
Client.createTokenByClientId(client.id, expiresAt, function (error, result) {
if (error) console.error(error);
$scope.tokenAdd.busy = false;