Files
mozo-backend/app/views/user/obtain_token.html.slim
T

17 lines
944 B
Plaintext

.row
h1 data-t='obtain_token.title' = t('user.obtain_token.title')
hr
- 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 = (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}');
// window.location = $root_url + '?user_id=#{current_user.id}&auth_token=#{current_user.authentication_token}';
// debugger;
// QMobile.signed_in({user_id: '#{current_user.id}', auth_token: '#{current_user.authentication_token}'});