Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication problem #847

Closed
arikazukito opened this issue Sep 24, 2017 · 28 comments
Closed

Authentication problem #847

arikazukito opened this issue Sep 24, 2017 · 28 comments

Comments

@arikazukito
Copy link

I have setup this many project using boilerplate.
but in some project:
In local system authentication is smoothly running without any problem but while uploading same file to server and if we try to login it always redirect to login page. can you tell me why is this happening?
i am very much thinking about it

@brentarcane
Copy link

I would check folder permissions for storage and cache. Laravel might be trying to write session data and failing with permission denied. If you're using linux, something like this should do it (executed from your laravel directory):

sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache

@arikazukito
Copy link
Author

arikazukito commented Sep 25, 2017 via email

@shirshak55
Copy link

can you clear and check laravel logs and say if any errors occur there?

@arikazukito
Copy link
Author

arikazukito commented Sep 29, 2017 via email

@shirshak55
Copy link

Have you seeded the database?
You are using hosting which may impose several risk like if you use sqlite somebody can grab your database. Like your readme.md contains sona etc..

Try VPS hosting they are very cheap 5$ a month if you have any problem you can contact us.

@arikazukito
Copy link
Author

arikazukito commented Sep 29, 2017 via email

@arikazukito
Copy link
Author

arikazukito commented Sep 30, 2017 via email

@arikazukito
Copy link
Author

arikazukito commented Sep 30, 2017 via email

@shirshak55
Copy link

show us the line where error occured.

View: /home/hamronote/public_html/Profile1/resources/views/frontend/businessman/index.blade.php

And also show us 63ec82b1bc4bd5a552a145069ab0ec3b68aeb156.php (line 202) show 4-5 lines near that line 202. This file is found in storage view chache folder.

@arikazukito
Copy link
Author

arikazukito commented Sep 30, 2017 via email

@arikazukito
Copy link
Author

arikazukito commented Sep 30, 2017 via email

@shirshak55
Copy link

shirshak55 commented Sep 30, 2017

i guess it should be Auth::user() by the way .
And for this to work you must be logged in. If no logged in it will throw some form of error. So use Auth::check() first to check if user is logged in or not

@arikazukito
Copy link
Author

arikazukito commented Sep 30, 2017 via email

@shirshak55
Copy link

@arikazukito

en: You are trying to access email but Auth::user() which is null and inderectly you are calling ->email on it.
For best possible turn on debugging mode etc.. And I cannot explicitly say what might be other factor

np: Aba bro lai nepali aucha jasto cha. Project private huna sakcha tei vayera code dina namileko hola. Pahila kura jastai bro logged in hununna vaney laravel ko Auth Facade lai kei idea hudaina ki kasari email nikalney vanera . Tei vayera bro lay null bata email derive garna khojeko vayera testo error ako ho. Aba tyo code bro lay haleko ho ki hoina vanney kura aucha. Yo boiler plate ma testo code ta hunu naparney ho add garerai hola . Local authentication logged in vayera huna sakcha naako. Logged in huda ki Auth::user() lay App\Model\User ko instance dincha.

Hope it clears.

@arikazukito
Copy link
Author

@bloggervista i have removed auth::user() in frontend page, thats not issue,
the issue is when i try to login it cause problem, it always redirect to login form page

@shirshak55
Copy link

At Auth Login Controller where have you set redirect url?
And that redirect url must have some associated routes.
After that routes there must be some view containing this:

You can search it from text editor.

@arikazukito
Copy link
Author

In local authentication works fine, but when i migrate it in server it shows problem ...

@shirshak55
Copy link

in production try to run with debug mode true. and many things get turned on and off on production mode. Like ssl is turned on. And check the middleware for redirection located at App\Http\Middleware

@Shuyinsama
Copy link
Collaborator

Any development on this? Is there something we can further help with ?

@shirshak55
Copy link

I guess its fixed.

@arikazukito
Copy link
Author

arikazukito commented Oct 15, 2017 via email

@shirshak55
Copy link

is it fixed now?

@shirshak55
Copy link

@Shuyinsama I guess we can close it as laravel 5.4 support is going to be over. And completely new and fresh version of this boilerplate is to be released soon.

@triswan
Copy link

triswan commented Oct 28, 2017

I have the same problem.. Please don't close it yet, i need the authentication to work very soon to show to my client..
The problem is i cant see any error log while debug mode is on, debugbar is active

@shirshak55
Copy link

@triswan Try php artisan config:cache and check the sessions which is written in file. And please describe how to recreate this issue. Anyway new version of this is coming so i guess you will use that instead of this. Because many component will be replace by package so you will need to upgrade it.

@triswan
Copy link

triswan commented Nov 1, 2017

found the problem, the server could not set cookie, it is not the boilerplate problem...

@shirshak55
Copy link

yes exactly give permissions to those folders.

@Shuyinsama
Copy link
Collaborator

Do you still need any help @arikazukito ? Since there is no way for me to check what might be the problem we can't really help.

You are being redirected to the login page after logging in right?
What is the server setup? (PHP version, Ubuntu version etc etc)

Or did you solve the problem already?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants