{"action":"opened","issue":{"url":"https://api.github.com/repos/btcmafia/BTCFX/issues/6","labels_url":"https://api.github.com/repos/btcmafia/BTCFX/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/btcmafia/BTCFX/issues/6/comments","events_url":"https://api.github.com/repos/btcmafia/BTCFX/issues/6/events","html_url":"https://github.com/btcmafia/BTCFX/issues/6","id":81453471,"number":6,"title":"Sign In Process","user":{"login":"btcmafia","id":5617324,"avatar_url":"https://avatars.githubusercontent.com/u/5617324?v=3","gravatar_id":"","url":"https://api.github.com/users/btcmafia","html_url":"https://github.com/btcmafia","followers_url":"https://api.github.com/users/btcmafia/followers","following_url":"https://api.github.com/users/btcmafia/following{/other_user}","gists_url":"https://api.github.com/users/btcmafia/gists{/gist_id}","starred_url":"https://api.github.com/users/btcmafia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btcmafia/subscriptions","organizations_url":"https://api.github.com/users/btcmafia/orgs","repos_url":"https://api.github.com/users/btcmafia/repos","events_url":"https://api.github.com/users/btcmafia/events{/privacy}","received_events_url":"https://api.github.com/users/btcmafia/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-27T13:44:59Z","updated_at":"2015-05-27T13:44:59Z","closed_at":null,"body":"Let's make it a 2 step process:\r\n1. Enter username and password\r\n2. Enter OTP - TOTP if 2FA enabled, OR EmailCode otherwise\r\n\r\n##Required Changes##\r\nCreate session after Step 1\r\nUpdate session with OTPVerified after Step 2\r\nWhen checking if user is signed in, if session exists but OTPVerfied == false, redirect to /signin.twofactor/\r\nAlso, check if email is verified, or redirect to /register/thanks/\r\n\r\n###Therefore###\r\nLet's create a new method within the Functions class to check if user is signed in / verified / OTPVerified / is_admin, redirect if necessary, then return $details + $details['email'], $details['username']."}}