o
    h&                     @   sT   d dl mZ d dlmZ d dlmZmZmZ G dd deZe	eZ
e	eZdS )    )app_settings)get_adapter)OAuth2AdapterOAuth2CallbackViewOAuth2LoginViewc                   @   sN   e Zd ZdZejei ZedZd	eZ
d	eZd	eZdd ZdS )	Auth0OAuth2Adapterauth0	AUTH0_URLz{0}/oauth/tokenz{0}/authorizez{0}/userinfoc                 C   s0   t   j| jd|jid }|  ||S )Naccess_token)params)r   get_requests_sessiongetprofile_urltokenjsonget_providersociallogin_from_response)selfrequestappr   response
extra_data r   b/var/www/html/pos/venv/lib/python3.10/site-packages/allauth/socialaccount/providers/auth0/views.pycomplete_login   s   z!Auth0OAuth2Adapter.complete_loginN)__name__
__module____qualname__provider_idr   	PROVIDERSr   settingsprovider_base_urlformataccess_token_urlauthorize_urlr   r   r   r   r   r   r   
   s    



r   N)allauth.socialaccountr   allauth.socialaccount.adapterr   ,allauth.socialaccount.providers.oauth2.viewsr   r   r   r   adapter_viewoauth2_loginoauth2_callbackr   r   r   r   <module>   s    
