๐Ÿ‡ฎ๐Ÿ‡ณIndia @ruturaj chaubey

Pune, India
Account created on 13 September 2021, over 3 years ago
  • Engineer - Full Stack at QED42ย 
#

Merge Requests

More

Recent comments

๐Ÿ‡ฎ๐Ÿ‡ณIndia ruturaj chaubey Pune, India

I was able to reproduce this issue on a fresh Drupal + XB install.

Drupal\Core\Render\Component\Exception\InvalidComponentException: [image.src] Invalid URL format in Drupal\Core\Theme\Component\ComponentValidator->validateProps() (line 203 of /var/www/html/core/lib/Drupal/Core/Theme/Component/ComponentValidator.php).\
๐Ÿ‡ฎ๐Ÿ‡ณIndia ruturaj chaubey Pune, India

The back-end code looks something like this

 public function success(Request $request) {
    $authHeader = $request->headers->get('Authorization');

    if ($authHeader && preg_match('/Bearer\s(\S+)/', $authHeader, $matches)) {
        $jwt = $matches[1];
        try {
          $decoded = JWT::decode($jwt, 'dummy-jwt-secret');
  
          // Assuming the payload has a userId.
          $uid = $decoded->userId;
          $user = User::load($uid);
  
          if ($user) {
            return new JsonResponse([
              'status' => 'success',
              'user' => [
                'uid' => $user->id(),
                'name' => $user->getUsername(),
              ],
            ]);
          }
        } catch (\Exception $e) {
          $this->logger->error('JWT validation failed: @message', ['@message' => $e->getMessage()]);
          return new JsonResponse(['status' => 'error', 'message' => 'Invalid JWT token'], 401);
        }
      }
  

    $data = [
      'status' => 'success',
      'message' => 'The request was successful.',
      'value' => $authHeader
    ];
    return new JsonResponse($data);
  }
๐Ÿ‡ฎ๐Ÿ‡ณIndia ruturaj chaubey Pune, India

@brianperry

The example you shared in #5 โ†’ looks pretty solid.

For the second scenario, I was able to issue a JWT from a JS app and send it to the Drupal back-end.

On Drupal front, I tried to consume the token using a custom controller but its still in progress.

Is this the kind of strategy we want to use in this case?

๐Ÿ‡ฎ๐Ÿ‡ณIndia ruturaj chaubey Pune, India

Ruturaj Chaubey โ†’ made their first commit to this issueโ€™s fork.

๐Ÿ‡ฎ๐Ÿ‡ณIndia ruturaj chaubey Pune, India

Ruturaj Chaubey โ†’ made their first commit to this issueโ€™s fork.

๐Ÿ‡ฎ๐Ÿ‡ณIndia ruturaj chaubey Pune, India

Ruturaj Chaubey โ†’ made their first commit to this issueโ€™s fork.

๐Ÿ‡ฎ๐Ÿ‡ณIndia ruturaj chaubey Pune, India

Ruturaj Chaubey โ†’ made their first commit to this issueโ€™s fork.

๐Ÿ‡ฎ๐Ÿ‡ณIndia ruturaj chaubey Pune, India

Ruturaj Chaubey โ†’ made their first commit to this issueโ€™s fork.

๐Ÿ‡ฎ๐Ÿ‡ณIndia ruturaj chaubey Pune, India

Ruturaj Chaubey โ†’ made their first commit to this issueโ€™s fork.

๐Ÿ‡ฎ๐Ÿ‡ณIndia ruturaj chaubey Pune, India

Ruturaj Chaubey โ†’ made their first commit to this issueโ€™s fork.

๐Ÿ‡ฎ๐Ÿ‡ณIndia ruturaj chaubey Pune, India

Converted ViewsDisplayExtender plugin discovery to PHP attributes.
@larowlan is the approach of conversion correct ?

๐Ÿ‡ฎ๐Ÿ‡ณIndia ruturaj chaubey Pune, India

Ruturaj Chaubey โ†’ made their first commit to this issueโ€™s fork.

๐Ÿ‡ฎ๐Ÿ‡ณIndia ruturaj chaubey Pune, India

Added the OVERRIDDEN highlight on the custom theme templates that override the core template.

๐Ÿ‡ฎ๐Ÿ‡ณIndia ruturaj chaubey Pune, India

Ruturaj Chaubey โ†’ made their first commit to this issueโ€™s fork.

๐Ÿ‡ฎ๐Ÿ‡ณIndia ruturaj chaubey Pune, India

Ruturaj Chaubey โ†’ made their first commit to this issueโ€™s fork.

๐Ÿ‡ฎ๐Ÿ‡ณIndia ruturaj chaubey Pune, India

Ruturaj Chaubey โ†’ made their first commit to this issueโ€™s fork.

๐Ÿ‡ฎ๐Ÿ‡ณIndia ruturaj chaubey Pune, India

Ruturaj Chaubey โ†’ made their first commit to this issueโ€™s fork.

๐Ÿ‡ฎ๐Ÿ‡ณIndia ruturaj chaubey Pune, India

Ruturaj Chaubey
- Registration booth.
- Made goodie bags and gave out welcome kits.

๐Ÿ‡ฎ๐Ÿ‡ณIndia ruturaj chaubey Pune, India

@andrimont The issue is not reproducible. Although I do get this error when I try to install the module on my Drupal instance (Refer screenshot).

Production build 0.71.5 2024