invisnik / laravel-steam-auth

Laravel Steam Auth
MIT License
172 stars 67 forks source link

Clean url after redirect login #2

Closed trainingday01 closed 9 years ago

trainingday01 commented 9 years ago

Hello! Thanks for the previous fix! If the redirect_url is set to '/' it returns a messy url after login. If it's set to any other, it returns clean.

invisnik commented 9 years ago

Do not quite understand what you mean. Can you give an example?

trainingday01 commented 9 years ago

When the Steam community login page appears, the url looks like: https://steamcommunity.com/openid/login?openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=checkid_setup&openid.return_to=http%3A%2F%2Fasp.dev&openid.realm=http%3A%2F%2Fasp.dev&openid.ns.sreg=http%3A%2F%2Fopenid.net%2Fextensions%2Fsreg%2F1.1&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select

After logging in and getting redirected, the url looks like: http://asp.dev/?openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fsteamcommunity.com%2Fopenid%2Flogin&openid.claimed_id=http%3A%2F%2Fsteamcommunity.com%2Fopenid%2Fid%2F76561197988487702&openid.identity=http%3A%2F%2Fsteamcommunity.com%2Fopenid%2Fid%2F76561197988487702&openid.return_to=http%3A%2F%2Fasp.dev&openid.response_nonce=2015-04-01T10%3A38%3A20ZBO8NRhooIv7trsqnzGzZaqFupmo%3D&openid.assoc_handle=1234567890&openid.signed=signed%2Cop_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle&openid.sig=qaDB%2BHQ6KS%2BxR%2FroggbqxKqQzGA%3D

This happens only if you redirect to / route.

trainingday01 commented 9 years ago

This: return redirect('/');

Doesn't do anything, it redirects to the redirect_url set in the config and ignores the redirect in the controller.

Try to change the redirect_url in the config to: 'redirect_url' => url('/home')

And you'll get a clean url after the redirect.

invisnik commented 9 years ago

I have everything works fine :) Try to version 1.1.0

trainingday01 commented 9 years ago

Поставил 1.1.1, при любой команде композера выдает: Catchable fatal error: Argument 2 passed to Illuminate\Routing\UrlGenerator::__construct() Проблема в 'redirect_url' => url('/')

И сейчас после валидейта в контроллере, ничего больше не делает кроме редиректа.

invisnik commented 9 years ago

Попробуй новую версию, исправил ошибку.