matheuscastroweb / device-authorization Goto Github PK
View Code? Open in Web Editor NEWDevice authorization hook using Ion auth
Device authorization hook using Ion auth
The functions are used to generate the token and the selector. In addition to checking if they are valid.
$this->ion_auth_model->_retrieve_selector_validator_couple($code);
$this->ion_auth_model->_generate_selector_validator_couple(20, 80);
Solution so far the extends Ion_auth_model
Event hook post_login
Interim solution using redirect ()
if ($this->increase_device_authorization($identity)) {
$this->ion_auth_model->set_error('device_confirmation_sent');
redirect('auth/login');
// return FALSE;
}
When using a hook being another class it is not possible to load it like this
$this->ion_auth->set_hook(
'post_login', // event
'verify_device_authorization', // name
$this->device_authorization, // class
'verify_device' // method,
$this->input->post('identity') // arguments
);
Only then
$this->ion_auth->set_hook(
'post_login',
'verify_device_authorization',
$this->device_authorization,
$this->device_authorization->verify_device($this->input->post('identity')),
$this->input->post('identity')
);
$this->ion_auth_model->set_error('device_confirmation_sent');
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.