plots2 icon indicating copy to clipboard operation
plots2 copied to clipboard

Login return_to not working when username not found

Open kevinzluo opened this issue 7 years ago • 16 comments

loginnotworking

The return_to parameter is not working when the username is not found.

kevinzluo avatar Dec 29 '18 20:12 kevinzluo

Please add Oauth milestone. Thanks

SidharthBansal avatar Dec 29 '18 20:12 SidharthBansal

#4456 , #4457 , and this issue are all related.

kevinzluo avatar Dec 30 '18 16:12 kevinzluo

Yeah they are related. But they are different issues. They are being executed on the same files.

SidharthBansal avatar Dec 30 '18 17:12 SidharthBansal

Perhaps if username is not found, it could flash an alert like "we couldn't find that" and land you on the /login page - or even "we couldn't find that username; check for mis-spellings or create a new account" ?

On Sun, Dec 30, 2018 at 12:44 PM Sidharth Bansal [email protected] wrote:

Yeah they are related. But they are different issues. They are being executed on the same files.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/4454#issuecomment-450575893, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ0GVVEX-MxEgVDmWopIZRp8_oyn1ks5u-PtrgaJpZM4ZktMq .

jywarren avatar Jan 03 '19 00:01 jywarren

hey @kevinzluo @jywarren @SidharthBansal @gauravano someone is working on this or i can take this up?

codeIriss avatar Jan 03 '19 18:01 codeIriss

No one is working on this. Go ahead on it. Thanks

SidharthBansal avatar Jan 03 '19 18:01 SidharthBansal

Hi Jeff, the flash message is coming. Problem is with return_to not working in case user_name does not exist. It is a weird error.

Perhaps if username is not found, it could flash an alert like "we couldn't find that" and land you on the /login page - or even "we couldn't find that username; check for mis-spellings or create a new account" ?

You can check out the gif provided by Kevin. Thanks

SidharthBansal avatar Jan 03 '19 18:01 SidharthBansal

great!

On Thu, Jan 3, 2019 at 1:27 PM Sidharth Bansal [email protected] wrote:

Hi Jeff, the flash message is coming. Problem is with return_to not working in case user_name does not exist. It is a weird error.

Perhaps if username is not found, it could flash an alert like "we couldn't find that" and land you on the /login page - or even "we couldn't find that username; check for mis-spellings or create a new account" ?

You can check out the gif provided by Kevin. Thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/4454#issuecomment-451232947, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJyz134SNIqXUsnTi6Yq1Z2gJ1Qp_ks5u_ktXgaJpZM4ZktMq .

jywarren avatar Jan 03 '19 18:01 jywarren

@codeIriss are you able to find cause of this bug?

SidharthBansal avatar Jan 10 '19 16:01 SidharthBansal

hey @SidharthBansal sorry for the delay. if @user.nil? flash[:warning] = "There is nobody in our system by that name, are you sure you have the right username?" redirect_to '/login' i think we want it to redirect us to login modal not to the login page? right? if not please let me know where to look @SidharthBansal @jywarren @gauravano

codeIriss avatar Jan 12 '19 15:01 codeIriss

If a person is on the login page then redirect to login page is correct else login modal. I hope this makes sense.

On Sat, Jan 12, 2019, 8:56 PM Aditya Kumar <[email protected] wrote:

hey @SidharthBansal https://github.com/SidharthBansal sorry for the delay. if @user.nil? flash[:warning] = "There is nobody in our system by that name, are you sure you have the right username?" redirect_to '/login' i think we want it to redirect us to login modal not to the login page? right? if not please let me know where to look @SidharthBansal https://github.com/SidharthBansal @jywarren https://github.com/jywarren @gauravano https://github.com/gauravano

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/4454#issuecomment-453756128, or mute the thread https://github.com/notifications/unsubscribe-auth/AUACQ4AC0XHbc5U3e9G4y1rDBhUg-7_Cks5vCf6ggaJpZM4ZktMq .

SidharthBansal avatar Jan 12 '19 15:01 SidharthBansal

Okay so we should move to login modal then and can u please help where to look for this?

On Sat 12 Jan, 2019, 9:17 PM Sidharth Bansal <[email protected] wrote:

If a person is on the login page then redirect to login page is correct else login modal. I hope this makes sense.

On Sat, Jan 12, 2019, 8:56 PM Aditya Kumar <[email protected] wrote:

hey @SidharthBansal https://github.com/SidharthBansal sorry for the delay. if @user.nil? flash[:warning] = "There is nobody in our system by that name, are you sure you have the right username?" redirect_to '/login' i think we want it to redirect us to login modal not to the login page? right? if not please let me know where to look @SidharthBansal https://github.com/SidharthBansal @jywarren https://github.com/jywarren @gauravano https://github.com/gauravano

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <https://github.com/publiclab/plots2/issues/4454#issuecomment-453756128 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AUACQ4AC0XHbc5U3e9G4y1rDBhUg-7_Cks5vCf6ggaJpZM4ZktMq

.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/4454#issuecomment-453757632, or mute the thread https://github.com/notifications/unsubscribe-auth/Ah0hPAyTxcrFGvW4xRe5ZHtEzcNeIfFxks5vCgOfgaJpZM4ZktMq .

codeIriss avatar Jan 12 '19 15:01 codeIriss

Views/user_sessions.html.erb

On Sat, Jan 12, 2019, 9:20 PM Aditya Kumar <[email protected] wrote:

Okay so we should move to login modal then and can u please help where to look for this?

On Sat 12 Jan, 2019, 9:17 PM Sidharth Bansal <[email protected] wrote:

If a person is on the login page then redirect to login page is correct else login modal. I hope this makes sense.

On Sat, Jan 12, 2019, 8:56 PM Aditya Kumar <[email protected] wrote:

hey @SidharthBansal https://github.com/SidharthBansal sorry for the delay. if @user.nil? flash[:warning] = "There is nobody in our system by that name, are you sure you have the right username?" redirect_to '/login' i think we want it to redirect us to login modal not to the login page? right? if not please let me know where to look @SidharthBansal https://github.com/SidharthBansal @jywarren https://github.com/jywarren @gauravano <https://github.com/gauravano

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/publiclab/plots2/issues/4454#issuecomment-453756128 , or mute the thread <

https://github.com/notifications/unsubscribe-auth/AUACQ4AC0XHbc5U3e9G4y1rDBhUg-7_Cks5vCf6ggaJpZM4ZktMq

.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <https://github.com/publiclab/plots2/issues/4454#issuecomment-453757632 , or mute the thread < https://github.com/notifications/unsubscribe-auth/Ah0hPAyTxcrFGvW4xRe5ZHtEzcNeIfFxks5vCgOfgaJpZM4ZktMq

.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/4454#issuecomment-453757795, or mute the thread https://github.com/notifications/unsubscribe-auth/AUACQ9-YvhpfkL9keMXDSRWWBU14JJLEks5vCgQwgaJpZM4ZktMq .

SidharthBansal avatar Jan 12 '19 15:01 SidharthBansal

@codeIriss are you able to debug it?

SidharthBansal avatar Jan 21 '19 09:01 SidharthBansal

It is a weird error. I am also trying in case I could find whats wrong.

SidharthBansal avatar Jan 21 '19 09:01 SidharthBansal

Moving to #4250 as this will enable the login modal to never be redirected to login page. So this error will vanish. Closing this one. Thanks everyone

SidharthBansal avatar Jan 21 '19 09:01 SidharthBansal