GodotNuts / GodotFirebase

Implementations of Firebase for Godot using GDScript
MIT License
517 stars 74 forks source link

[BUG] Godot 4 doesn't have "JavaScript" feature tag anymore. #379

Closed kyboon closed 6 months ago

kyboon commented 6 months ago

Describe the bug I was trying to get the Firebase OAuth working on Godot 4, the desktop build worked fine but the web build failed. Upon inspection I found out that in auth.gd, get_token_from_url() function, the line OS.has_feature('JavaScript') always return false.

To Reproduce Any implementation of OAuth on web build should fail.

Expected behavior get_token_from_url() should return the token.

Environment: Godot 4.2.stable.official Browser: Chrome, Edge

Additional context According to the Godot documentation , the tag "JavaScript" has been removed. I've tried to replace the faulty line with OS.has_feature('web') and it worked, get_token_from_url() is now returning the expected result, and the "Sign in with Google" worked perfectly for my web build. I'm current using this as a workaround.

WolfgangSenff commented 6 months ago

Well that's a good find! Do you want to open a PR with the fix, or no?

kyboon commented 6 months ago

I'm not sure which branch is for godot 3 and which is for godot 4, which is why I didn't create a PR instead.

On Sat, Jan 27, 2024, 11:05 AM Kyle Szklenski @.***> wrote:

Well that's a good find! Do you want to open a PR with the fix, or no?

— Reply to this email directly, view it on GitHub https://github.com/GodotNuts/GodotFirebase/issues/379#issuecomment-1913117844, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFZBWZ6K4ETFQNONS67NW3TYQTNPRAVCNFSM6AAAAABCNBPV7WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJTGEYTOOBUGQ . You are receiving this because you authored the thread.Message ID: @.***>

WolfgangSenff commented 6 months ago

Main is 3.x, and the branch labeled 4.x is for 4.

WolfgangSenff commented 6 months ago

Fixed by #380 .