Skip to content

Commit

Permalink
Fixed auth
Browse files Browse the repository at this point in the history
  • Loading branch information
britzl committed Nov 27, 2023
1 parent 2bd44b6 commit 50c0c24
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions example/example.script
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ local nakama_session = require "nakama.session"


local function email_login(client, email, password, username)
local session = client.authenticate_email(email, password, nil, true, username)
if session.token then
local account_api_account_email = {
email = email,
password = password,
}
local session = client.authenticate_email(account_api_account_email, true, username)
if session and session.token then
nakama_session.store(session)
client.set_bearer_token(session.token)
return true
Expand Down

0 comments on commit 50c0c24

Please sign in to comment.