Posts

Showing posts with the label Auth

Firebase REST API auth - access token

I have to use Firebase Database and server a REST API .I need to allow the REST API call only for authenticated users from the same freebase. According to Documentation on REST API Save data > Auth Section I able to successfully access the Database using database secret . https://firebase.google.com/docs/database/rest/save-data But I could not successfully retrieve the data using access token of authenticated user . https://<<removed-my-project-id>>.firebaseio.com/users.json?access_token=ya29.GlxuBLxJ6R2uNYJ7SXnMhe7Inqw94ShGeZ7MTBmyxYUI2cLDCXJcPAfbo1_uKLjUhfPX3uQw_ElBjIVwu73caeKJfBAh87GGRWZx2JiSwuIZybAmtVXyFyqaeYbAJQ Reffering confusing document again I pass the URL as fallows using the idtoken.(currentUser.getIdToken taken from cleint side) https:// <<my-project-id>> .firebaseio.com/users.json?auth=eyJhbGciOiJSUzI1NiIsImtpZCI6IjBkNWNlYjA1ODA2ODk3OTM3ZTAxNGFjMDNkYWZkODQyMzM4ZjBlNmQifQ.eyJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vZmV0Y2htZS1

Laravel Session Time Out - Trying to get property of non-object Error

Image
I have faced the follwing  error in laravel in user logged pages . Laravel Session Time Out  - Trying to get property of non-object Error The reason for error is session time out of the logged user but it not properly handled in the views . In larvel if the logged in user from auth , can be logged out using same auth middleware. Route::post('controllerName','folderName\fileName@fnNmae')- >middleware('auth'); https://stackoverflow.com/questions/34443632/make-session-expiration-redirect-back-to-login

Laravel Customize Auth RegisterController Step By Step

Image
In Laravel Default RegisterController located in Auth/RegisterController can be customized to to meet another requirement. It use the user table of Laravel and not use any e.g. : send the account activation mail with other detail namespace App\Http\Controllers\Auth; use App\User; use App\Http\Controllers\Controller; use Illuminate\Support\Facades\Validator; use Illuminate\Foundation\Auth\RegistersUsers; class RegisterController extends Controller {     /*     |--------------------------------------------------------------------------     | Register Controller     |--------------------------------------------------------------------------     |     | This controller handles the registration of new users as well as their     | validation and creation. By default this controller uses a trait to     | provide this functionality without requiring any additional code.     |     */     use RegistersUsers;     /**      * Where to redirect users after registr