Skip to content

Conversation

@fenix-hub
Copy link
Contributor

@fenix-hub fenix-hub commented Apr 5, 2021

Related to #171
This PR will implement automatic anonymous authentication for unauthorized requests.

  1. If a Firestore request is issued without the Client being authenticated (mail/password, token, etc.) an Anonymous authentication will be attempted automatically.
    Godot_v3 3-rc7_win64_vq5xUIfPyd

If Anonymous sign-in method is disabled (default option), the request will be skipped and the user will be notified.
Godot_v3 3-rc7_win64_AKfpOVshTk
If Anonymous sign-in method is enabled (manually set), the Client will be authenticated and the request (and further requests) will be processed.
Godot_v3 3-rc7_win64_W2PR8n3bz5

The authenticated anonymous user can always be logged out with logout() function if needed.

  1. A new signal is added in Auth for higher-level communication
# Emitted for each Auth request issued.
# `result_code` -> Either `1` if auth succeeded or `error_code` if unsuccessful auth request
# `result_content` -> Either `auth_result` if auth succeeded or `error_message` if unsuccessful auth request
signal auth_request(result_code, result_content)

Copy link
Collaborator

@WolfgangSenff WolfgangSenff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple very small things, otherwise looks good.

@WolfgangSenff WolfgangSenff merged commit 9d845ea into main Apr 8, 2021
@WolfgangSenff WolfgangSenff deleted the automatic_anonymous_authentication branch April 8, 2021 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants