Getting http 403 error while accessing photoURL of a firebase User
Asked Answered
W

3

10

I am successfully authenticating an user with firebase authentication from an angular project which is hosted in google app engine. But when i am trying to display the photourl mapped with the user object, i am getting the http 403 error code.

Do i need additional permission in the app level to access the photourl?

Example photo url: https://scontent.xx.fbcdn.net/v/t1.0-1/s100x100/10354686_10150004552801856_220367501106153455_n.jpg?oh=69aa0ab876bc8904fb59749a5e70382a&oe=598D6773

Wormseed answered 12/8, 2017 at 18:56 Comment(0)
W
2

It got solved in a strange way. From firebase console when i deleted the user and logged back in the photo url started working fine.

Wormseed answered 13/8, 2017 at 3:18 Comment(2)
i am guessing the photoURL goes stale and we need to refresh it. Any thoughts on how to refresh it programmatically, without having the user logout and log in?Nonpros
How can this be the solution in productionOsrock
B
27

add referrerpolicy="no-referrer" to the img tag, it worked for me

Baier answered 5/7, 2022 at 15:4 Comment(2)
for me too! ThanksBondman
Yeah this worked for me too, I'd love to know why that fixes it if anyone has an explanation.Friedafriedberg
W
2

It got solved in a strange way. From firebase console when i deleted the user and logged back in the photo url started working fine.

Wormseed answered 13/8, 2017 at 3:18 Comment(2)
i am guessing the photoURL goes stale and we need to refresh it. Any thoughts on how to refresh it programmatically, without having the user logout and log in?Nonpros
How can this be the solution in productionOsrock
M
2

This is the work around by adding no-referrer in referrerpolicy

adding no-referrer in referrerpolicy

Mussel answered 2/9, 2022 at 16:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.