google_authorization_url

Function google_authorization_url 

Source
pub async fn google_authorization_url<T: DatabasePool + Clone + Debug + Sync + Send + 'static>(
    session: Session<T>,
    __arg1: Extension<OAuth2ClientStore>,
) -> Result<String>
Expand description

The authorization URL for the OAuth2 flow

This will redirect the user to the OAuth2 provider’s login page and then to the callback URL

§Generics

  • T - The database pool

§Arguments

  • session - The axum session
  • oauth2_store - The OAuth2ClientStore extension

§Returns

The HTML response with the link to the OAuth2 provider’s login page

§Errors

loco_rs::errors::Error - When the OAuth2 client cannot be retrieved