The below process might get you by until the problem happens again, there are several things that would need to be checked to determine the actual problem but it is usually the ignition lock cylinder/ passlock sensor that is causing the problem.
To perform a relearn, rotate the key from lock through crank and release it to run. Leave the key on for minimum 10 minutes. Turn the key off for 5 seconds minimum. Repeat the same steps 2 more times including the key off for 5 seconds after the 3rd cycle on.
Diagram below, or click here