
    f                         d dl mZ d dlmZmZmZ  G d de      Z ej                  e      Z ej                  e      Z	y)    )get_adapter)OAuth2AdapterOAuth2CallbackViewOAuth2LoginViewc                   F    e Zd ZdZed        Zed        Zed        Zd Zy)CoinbaseOAuth2Adaptercoinbasec                      y)Nz(https://www.coinbase.com/oauth/authorize selfs    i/var/www/cs2snipe.com/venv/lib/python3.12/site-packages/allauth/socialaccount/providers/coinbase/views.pyauthorize_urlz#CoinbaseOAuth2Adapter.authorize_url   s    9    c                      y)Nz$https://www.coinbase.com/oauth/tokenr   r   s    r   access_token_urlz&CoinbaseOAuth2Adapter.access_token_url   s    5r   c                      y)Nz https://api.coinbase.com/v2/userr   r   s    r   profile_urlz!CoinbaseOAuth2Adapter.profile_url   s    1r   c                     t               j                         j                  | j                  d|i      }|j	                         }| j                         j                  ||      S )Naccess_token)params)r   get_requests_sessiongetr   jsonget_providersociallogin_from_response)r   requestapptokenkwargsresponse
extra_datas          r   complete_loginz$CoinbaseOAuth2Adapter.complete_login   sW    M!!#S!!>5*ASB 	
 ]]_
  "<<WjQQr   N)	__name__
__module____qualname__provider_idpropertyr   r   r   r#   r   r   r   r   r   	   sG    K: : 6 6 2 2Rr   r   N)
allauth.socialaccount.adapterr   ,allauth.socialaccount.providers.oauth2.viewsr   r   r   r   adapter_viewoauth2_loginoauth2_callbackr   r   r   <module>r.      sI    5 RM R2 ,++,AB1$112GHr   