{"id":30797031,"url":"https://github.com/proofoftom/drupal_siwe_server","last_synced_at":"2025-09-05T17:12:48.519Z","repository":{"id":312295206,"uuid":"1046843314","full_name":"proofoftom/drupal_siwe_server","owner":"proofoftom","description":"Custom Drupal module for decoupled authentication with JWT tokens compliant with Sign in with Ethereum (EIP-4361) standards.","archived":false,"fork":false,"pushed_at":"2025-08-29T15:44:30.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-29T18:43:55.385Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/proofoftom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-29T10:09:39.000Z","updated_at":"2025-08-29T15:44:33.000Z","dependencies_parsed_at":"2025-08-29T18:43:57.799Z","dependency_job_id":"6eccb671-4eeb-47b8-a3ba-083791288da1","html_url":"https://github.com/proofoftom/drupal_siwe_server","commit_stats":null,"previous_names":["proofoftom/drupal_siwe_server"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/proofoftom/drupal_siwe_server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proofoftom%2Fdrupal_siwe_server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proofoftom%2Fdrupal_siwe_server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proofoftom%2Fdrupal_siwe_server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proofoftom%2Fdrupal_siwe_server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/proofoftom","download_url":"https://codeload.github.com/proofoftom/drupal_siwe_server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proofoftom%2Fdrupal_siwe_server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273790354,"owners_count":25168669,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-05T17:12:45.264Z","updated_at":"2025-09-05T17:12:48.492Z","avatar_url":"https://github.com/proofoftom.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SIWE Server for Drupal\n\n## Overview\n\nThis module provides API endpoints for SIWE authentication with Next-Drupal, using the Drupal JWT module for token generation and validation.\n\n## Requirements\n\n- Drupal 10.0 or higher\n- PHP 8.1 or higher\n- Composer\n- siwe_login module\n- Drupal JWT module\n\n## Installation\n\n1. Install via Composer: `composer require drupal/siwe_server`\n2. Enable modules: `drush en siwe_server jwt jwt_auth_issuer -y`\n3. Configure the JWT module at `/admin/config/system/jwt` (see below)\n4. Import configuration: `drush config-import --partial --source=modules/custom/siwe_server/config/install`\n5. Configure at `/admin/config/services/siwe-server` or through the admin menu under \"Configuration \u003e Web services \u003e SIWE Server\"\n\n## JWT Module Configuration\n\nThis module relies on the Drupal JWT module for token generation. You'll need to:\n\n1. Create a key at `/admin/config/system/keys`:\n   - Type: JWT HMAC Key or JWT RSA Key\n   - Provider: Configuration or File\n2. Configure the JWT module at `/admin/config/system/jwt` to use your key\n\n## API Endpoints\n\n- `GET /api/siwe/nonce` - Get authentication nonce\n- `POST /api/siwe/auth` - Authenticate with SIWE\n- `POST /api/siwe/refresh` - Refresh access token (not currently supported with JWT module)\n- `POST /api/siwe/logout` - Logout user\n\n## Configuration\n\nSee `/admin/config/services/siwe-server` for configuration options.\n\n### Allowed Origins\n\nThe \"Allowed Origins\" setting allows you to specify which origins are allowed to access the SIWE API endpoints. These same origins are used to configure the expected domains in the SIWE Login module.\n\nThis ensures that SIWE messages generated by your frontend application are properly validated by the SIWE Login module.\n\nYou can specify multiple origins, one per line (e.g., `http://localhost:3000`, `https://your-nextjs-app.com`). Enter the exact URLs that will be used by your frontend applications.\n\nAll specified origins are used for SIWE domain validation.\n\n### Allow Drupal Login\n\nThe \"Allow Drupal login with SIWE Login Block\" checkbox controls whether users can login to the Drupal site using the SIWE Login Block. When enabled, the current site domain is included in the allowed domains for SIWE validation.\n\n## Security\n\n- Uses JWT tokens with configurable algorithm (defaults to HS256)\n- Configurable token expiration\n\n## Support\n\nReport issues at: [https://github.com/proofoftom/drupal_siwe_server/issues](https://github.com/proofoftom/drupal_siwe_server/issues)\n\n## Implementation Details\n\nThis module provides REST API endpoints for SIWE authentication that are compatible with Next-Drupal:\n\n1. The `/api/siwe/auth` endpoint validates the SIWE message and signature using the siwe_login module\n2. If the authentication is successful, a JWT token is generated using the Drupal JWT module\n3. The JWT token can be used to authenticate subsequent requests to Drupal\n4. The `/api/siwe/logout` endpoint handles user logout\n\n## Testing\n\nUnit tests are available in the `tests/src/Unit/Form` directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproofoftom%2Fdrupal_siwe_server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fproofoftom%2Fdrupal_siwe_server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproofoftom%2Fdrupal_siwe_server/lists"}