Skip to content

Commit

Permalink
@W-14777545 - Remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
vsbharath authored Jan 18, 2024
1 parent 376f18c commit 9505de1
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions sfdo_template_helpers/oauth2/salesforce/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ def base_url(self):
return base_url

def complete_login(self, request, app, token, **kwargs):
# make sure token is attached to a SocialApp in the db
#Social app is retrieved from the settings.SOCIALACCOUNT_PROVIDERS
#ensure_socialapp_in_db(token, app)


token = fernet_decrypt(token.token)
headers = {"Authorization": f"Bearer {token}"}
verifier = request.session["socialaccount_state"][1]
Expand Down Expand Up @@ -137,25 +134,6 @@ def parse_token(self, data):
return super().parse_token(data)


# @W-14777545 - Disabling ensure social app in db
# def ensure_socialapp_in_db(token, social_app):
# """Make sure that token is attached to a SocialApp in the db.

# Since we are using SocialApps constructed from settings,
# there are none in the db for tokens to be related to
# unless we create them here.
# """
# if social_app is None:
# social_app = token.app

# if getattr(social_app ,'pk', None) is None:
# provider = providers.registry.get_class(social_app.provider)
# app, created = SocialApp.objects.get_or_create(
# provider=provider.id,
# name=provider.name,
# client_id="-",
# )
# token.app = app


oauth2_login = OAuth2LoginView.adapter_view(SalesforceOAuth2Adapter)
Expand Down

0 comments on commit 9505de1

Please sign in to comment.