Skip to content

fix: update authentication for latest Gojek app (v5.57.2)#34

Open
clawdiab wants to merge 5 commits into
mychaelgo:masterfrom
clawdiab:fix/authentication-updates
Open

fix: update authentication for latest Gojek app (v5.57.2)#34
clawdiab wants to merge 5 commits into
mychaelgo:masterfrom
clawdiab:fix/authentication-updates

Conversation

@clawdiab

Copy link
Copy Markdown

Updates Gojek SDK with working authentication for the new accounts.goto-products.com endpoints.

Changes

  • New sdk/auth-gojek-node package for modern auth flow
  • Updated endpoints from goid.gojekapi.com to accounts.goto-products.com
  • 5-step login flow: methods → initiate → verify → accountlist → token
  • PIN and OTP authentication support
  • X-E1/X-E2/X-E3/X-M1 header documentation
  • Crypto-based UUID and hex generation
  • All PII redacted from docs and examples

Known Limitations

  • X-E1 header requires iOS/Android app signing key — cannot be replicated externally
  • validation_jwt (PIN encryption) is generated client-side by the app

Tested with Gojek iOS app v5.57.2.

- New sdk/auth-gojek-node package for modern auth flow
- Updated endpoints from goid.gojekapi.com to accounts.goto-products.com
- 5-step login flow: methods → initiate → verify → accountlist → token
- PIN and OTP authentication support
- X-E1/X-E2/X-E3/X-M1 header documentation
- Crypto-based UUID and hex generation
- Redacted all PII from docs and examples

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the repo for the newer Gojek authentication stack by introducing a new Node auth SDK targeting accounts.goto-products.com, updating docs to describe the new multi-step login flow, and modernizing Node SDK dependencies (axios/typescript/@types/node) alongside refreshed examples and tooling.

Changes:

  • Add sdk/auth-gojek-node implementing the new 5-step auth flow (methods → initiate → verify → accountlist → token) plus SSO support.
  • Update existing Node SDK packages to newer axios/typescript/node typings and refresh examples to load config from .env.
  • Add mitmproxy capture tooling and new documentation describing signature headers (X-E1/X-E2/X-E3/X-M1) and iOS login flow.

Reviewed changes

Copilot reviewed 23 out of 31 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
tools/gojek_login.js New CLI login helper for OTP/token retrieval (currently has correctness/syntax issues).
tools/capture_gojek_auth.py New mitmproxy addon to capture auth-related headers.
tools/capture_all.py New verbose mitmproxy addon to capture broader auth-domain traffic.
tools/PROXY_SETUP.md Instructions for setting up mitmproxy and capturing App Check headers.
sdk/gopay-gojek-node/package.json Bumps axios/typescript/@types/node versions.
sdk/gopay-gojek-node/package-lock.json Lockfile updated for new dependency tree.
sdk/goid-gojek-node/package.json Bumps axios/typescript/@types/node and adjusts repository metadata formatting.
sdk/goid-gojek-node/package-lock.json Lockfile updated for new dependency tree.
sdk/api-gojek-node/package.json Bumps axios/typescript/@types/node versions.
sdk/api-gojek-node/package-lock.json Lockfile updated for new dependency tree.
sdk/auth-gojek-node/tsconfig.json New TypeScript build configuration for auth SDK.
sdk/auth-gojek-node/src/index.ts New AuthApi implementation for accounts.goto-products.com flows + header generation helpers.
sdk/auth-gojek-node/package.json New auth SDK package manifest.
sdk/auth-gojek-node/package-lock.json Lockfile for new auth SDK package.
sdk/auth-gojek-node/dist/index.js Checked-in compiled output for auth SDK.
sdk/auth-gojek-node/dist/index.d.ts Checked-in type declarations for auth SDK.
package.json Adds root dependency on dotenv for examples/tooling.
package-lock.json Lockfile for root dotenv dependency.
examples/node/gopay/get-balance.js Example updated to read headers/tokens from .env and use generated IDs.
examples/node/api/get-customer.js Example updated to read headers/tokens from .env and use generated IDs.
examples/node/goid/sso-login.js New SSO login example using the new auth SDK.
examples/node/goid/goid.js Removes legacy example that hardcoded secrets/PII.
examples/node/goid/auth.js New OTP/SSO auth flow example using the new auth SDK (currently has syntax issues).
docs/gopay-gojekapi.yaml Bumps doc version and improves header parameter descriptions/examples.
docs/goid-gojekapi.yaml Bumps doc version and removes hardcoded client_secret defaults in favor of descriptions.
docs/api-gojekapi.yaml Bumps doc version and improves header parameter docs/examples.
docs/LOGIN_FLOW_IOS.md New documentation describing iOS auth flow and required headers.
docs/AUTHENTICATION_CHANGES.md New high-level migration doc for the new auth endpoints and signature headers.
README.md Expanded setup/auth instructions (currently corrupted by line-number artifacts).
.gitignore Adds ignores for captured headers/tokens/logs and sensitive artifacts (.env, APKs, certs).
.env.example New environment variable template (currently malformed).
Files not reviewed (4)
  • sdk/api-gojek-node/package-lock.json: Language not supported
  • sdk/auth-gojek-node/package-lock.json: Language not supported
  • sdk/goid-gojek-node/package-lock.json: Language not supported
  • sdk/gopay-gojek-node/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tools/gojek_login.js Outdated
Comment thread tools/capture_all.py Outdated
Comment thread README.md Outdated
Comment thread docs/AUTHENTICATION_CHANGES.md
Comment thread docs/AUTHENTICATION_CHANGES.md Outdated
Comment thread tools/capture_gojek_auth.py Outdated
Comment thread tools/capture_gojek_auth.py Outdated
Comment thread .env.example Outdated
Comment thread examples/node/goid/auth.js Outdated
Comment thread docs/LOGIN_FLOW_IOS.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 31 changed files in this pull request and generated 18 comments.

Files not reviewed (4)
  • sdk/api-gojek-node/package-lock.json: Language not supported
  • sdk/auth-gojek-node/package-lock.json: Language not supported
  • sdk/goid-gojek-node/package-lock.json: Language not supported
  • sdk/gopay-gojek-node/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)

README.md:5

  • README content includes diff/line-number artifacts (e.g., 1| 1|# gojek) as literal text, which will render incorrectly. Remove these prefixes so the Markdown contains only the intended content.
# gojek

Un-official Go-jek API Wrapper. API end point known by decompile the android APK.

- [Have trouble ?](https://github.com/mychaelgo/gojek/issues)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json Outdated
Comment thread docs/AUTHENTICATION_CHANGES.md Outdated
Comment thread docs/LOGIN_FLOW_IOS.md Outdated
Comment thread tools/capture_gojek_auth.py
Comment thread .env.example Outdated
Comment thread docs/AUTHENTICATION_CHANGES.md
Comment thread sdk/auth-gojek-node/src/index.ts
Comment thread sdk/gopay-gojek-node/package.json Outdated
Comment thread sdk/api-gojek-node/package.json Outdated
Comment thread tools/gojek_login.js

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 31 changed files in this pull request and generated 12 comments.

Files not reviewed (4)
  • sdk/api-gojek-node/package-lock.json: Language not supported
  • sdk/auth-gojek-node/package-lock.json: Language not supported
  • sdk/goid-gojek-node/package-lock.json: Language not supported
  • sdk/gopay-gojek-node/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread tools/gojek_login.js Outdated
Comment thread tools/capture_all.py Outdated
Comment thread tools/capture_all.py
Comment thread examples/node/goid/auth.js Outdated
Comment thread tools/gojek_login.js Outdated
Comment thread tools/capture_gojek_auth.py Outdated
Comment thread examples/node/goid/sso-login.js Outdated
Comment thread examples/node/goid/auth.js Outdated
Comment thread .env.example Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants