You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
In the documentation, There is an example for new session when user is logging in:
public function newSession(Request $request) {
//Insert the session into the telegram_sessions table
$user = User::find($request->get('user_id'));
$telegramSession = $user->telegramSession()->create([
'session_file' => "{$user->name}.madeline"
]);
//You can either use one of this following method
$madelineProto = $this->factory->get($telegramSession);
//or
$madelineProto = Factory::get($telegramSession);
$madelineProto->phoneLogin($request->get('phone_number'));
return response()->json([
'message' => 'Phone code sent!'
]);
}
At the beginning of the function, It gets user_id from the request.
If we know the user_id, Why do we need to authenticate the user?
Assuming that the laravel application uses telegram authentication api to authenticate its users.
The text was updated successfully, but these errors were encountered:
Hi!
In the documentation, There is an example for new session when user is logging in:
At the beginning of the function, It gets user_id from the request.
If we know the user_id, Why do we need to authenticate the user?
Assuming that the laravel application uses telegram authentication api to authenticate its users.
The text was updated successfully, but these errors were encountered: