CallMeNP / lara-auth-bridge

[Unmaintained] Offers a simple API for the included custom phpBB authentication module. for phpBB(3.0,3.1) and laravel5
MIT License
16 stars 8 forks source link

Cant connect laravel with phpbb #6

Closed anonprophet closed 8 years ago

anonprophet commented 8 years ago

im already try install using instruction

my laravel website using username to login , im already login in my laravel web, when open phpbb its not login

laravel5_2 laravel5_3

Bukashk0zzz commented 8 years ago

Forum and laravel project on same domain?

Autologin will works only if they are on the same domain because of cookie policy.

anonprophet commented 8 years ago

ya laravel in http://laravel5.dev phpbb in http://laravel5.dev/forum

do i miss something ?

Bukashk0zzz commented 8 years ago

Looks all correct. What happens when you login at forum manually?

Bukashk0zzz commented 8 years ago

Also what you see when open http://laravel5.dev/auth-bridge/login in browser?

anonprophet commented 8 years ago

when login manually from phpbb using anonprophet its always say You have specified an incorrect username. Please check your username and try again.

http://laravel5.dev/auth-bridge/login only white blank space

Bukashk0zzz commented 8 years ago

http://laravel5.dev/auth-bridge/login only white blank space

This is the problem. Do you sure that you add provider 'providers' => array( 'CallMeNP\LaraAuthBridge\LaraAuthBridgeServiceProvider', );

And maybe you use multi auth? What function do you use for getting user data? Auth::client()->user() or Auth::user() ?

anonprophet commented 8 years ago

im already add it, but little change ::class using 5.1 lara

im use Auth::user()

Bukashk0zzz commented 8 years ago

I can help you without debuging your case.

You have problem in https://github.com/CallMeNP/lara-auth-bridge/blob/master/src/CallMeNP/LaraAuthBridge/Controllers/ApiController.php

Metod getSession() have to return your current session but this not happens. You can debug why this happens. Also maybe you have some php errors in server logs?

anonprophet commented 8 years ago

already set debug mode to true

check php error log only got this when access /auth-bridge/login

[28-Sep-2015 08:51:38 UTC] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 65488 bytes) in C:\xampp\htdocs\laravel5\vendor\laravel\framework\src\Illuminate\Support\Str.php on line 2710

Bukashk0zzz commented 8 years ago

So thats a problem.

If you do not have access to your php.ini file (and your webhost allows it), you can override the memory allocation through your .htaccess file. Add php_value memory_limit 512M (or whatever your desired allocation is).

anonprophet commented 8 years ago

sure i have access, im develop in my local PC using XAMPP im already change the value in php.ini to 256M and 512M but its not help.

[28-Sep-2015 08:57:36 UTC] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 65488 bytes) in C:\xampp\htdocs\laravel5\vendor\laravel\framework\src\Illuminate\Support\Str.php on line 2710

[28-Sep-2015 08:59:06 UTC] PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 65488 bytes) in C:\xampp\htdocs\laravel5\vendor\laravel\framework\src\Illuminate\Support\Str.php on line 2710
Bukashk0zzz commented 8 years ago

What exactly Laravel version do you have?

anonprophet commented 8 years ago

Laravel 5.1.X

lara2

Bukashk0zzz commented 8 years ago

Have the same configuration and all works. Try to find on what exactly point this happens.

I mean this error happens when php run LaraAuthBridge/Controllers/ApiController.php file or not.

anonprophet commented 8 years ago

can i get ur email ?

Bukashk0zzz commented 8 years ago

Also try to put dd(Auth::user());die(); in first row of getSession method.

Skype: bukashk0z

anonprophet commented 8 years ago

i got this when dd

User {#221 ▼
  #table: "users"
  #fillable: array:5 [▶]
  #hidden: array:2 [▶]
  #connection: null
  #primaryKey: "id"
  #perPage: 15
  +incrementing: true
  +timestamps: true
  #attributes: array:9 [▶]
  #original: array:9 [▶]
  #relations: []
  #visible: []
  #appends: []
  #guarded: array:1 [▶]
  #dates: []
  #dateFormat: null
  #casts: []
  #touches: []
  #observables: []
  #with: []
  #morphClass: null
  +exists: true
  +wasRecentlyCreated: false
}
Bukashk0zzz commented 8 years ago

Skype.

msyadav88 commented 4 years ago

Hi, I am also facing the same problem. Means After getting login and then when autologin() is called it is not getting true for Auth::check() in getseesion api.