simplify getting token communication

This commit is contained in:
2014-08-28 16:10:12 +02:00
parent 40d06156fa
commit af4510cdc6
3 changed files with 13 additions and 21 deletions
+2 -4
View File
@@ -4,10 +4,8 @@
- if current_user.present?
p Waiting for authentication to complete.....
javascript:
Qstorage = window.localStorage;
Qstorage.setItem('auth_token', '#{current_user.authentication_token}');
Qstorage.setItem('user_id', '#{current_user.id}');
if(!window.opener || window.opener != window) window.close();
window.location.href = "/close_window?user_id=#{current_user.id}&authentication_token=#{current_user.authentication_token}"
// if(!window.opener || window.opener != window) window.close();
// window.location = (Qstorage.getItem('root_url') || '/user/index.html') + '?user_id=#{current_user.id}&auth_token=#{current_user.authentication_token}';
// localStorage.setItem('auth_token', '#{current_user.authentication_token}');
// localStorage.setItem('user_id', '#{current_user.id}');