code: def get(self, request):
          
          state = get_random_string(self.get_settings('OIDC_STATE_SIZE', 32))
          redirect_field_name = self.get_settings('OIDC_REDIRECT_FIELD_NAME', 'next')
          reverse_url = self.get_settings('OIDC_AUTHENTICATION_CALLBACK_URL',
                                          'oidc_authentication_callback')
  
          params = {
              'response_type': 'code',
              'scope': self.get_settings('OIDC_RP_SCOPES', 'openid email'),
              'client_id': self.OIDC_RP_CLIENT_ID,
              'redirect_uri': absolutify(
                  request,
                  reverse(reverse_url)
              ),
              'state': state,
          }
  
          params.update(self.get_extra_params(request))
  
          if self.get_settings('OIDC_USE_NONCE', True):
              nonce = get_random_string(self.get_settings('OIDC_NONCE_SIZE', 32))
              params.update({
                  'nonce': nonce
              })
              request.session['oidc_nonce'] = nonce
  
          request.session['oidc_state'] = state
          request.session['oidc_login_next'] = get_next_url(request, redirect_field_name)
  
          query = urlencode(params)
          redirect_url = '{url}?{query}'.format(url=self.OIDC_OP_AUTH_ENDPOINT, query=query)
          return HttpResponseRedirect(redirect_url)
docs: OIDC client authentication initialization HTTP endpoint