parse-community / parse-community/parse-server-push-adapter
Supply APNS p8 token as string
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 96
- Forks
- 108
- PR merge metrics
- No merged PRs in 30d
Description
New Feature / Enhancement Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
Current Limitation
The APNS p8 token has to be supplied in form of a .p8 file. That makes it more difficult to store as a secured string (e.g. using AWS Secrets Manager) but may make it more tempting for beginners to commit the private key as part of source code to their repository, which is bad practice.
Feature / Enhancement Description
Currently the token key is specified via a file path:
push: {
ios: {
token: {
key: './aps.p8',
...
}
}
}
To avoid a breaking change an additional param could be introduced that allows to supply the key as string:
push: {
ios: {
token: {
keyString: '-----BEGIN PRIVATE KEY-----....',
...
}
}
}
or, to avoid a new parameter, the adapter could interpret a key value that starts with -----BEGIN PRIVATE KEY---- and ends with -----END PRIVATE KEY----- not as a file path but as the key itself. So key can either be a file path or the key itself.
Example Use Case
n/a
Alternatives / Workarounds
Save the securely stored private key as a file on deployment, which may be unwanted in some scenarios.
3rd Party References
n/a
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the APNS token configuration handling that currently treats token.key as a .p8 file path. Review the existing configuration and tests, then determine which of the proposed string-input approaches preserves the current path behavior. Done means a securely supplied key string is accepted without breaking file-path configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100