Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supply APNS p8 token as string #203

Open
3 tasks done
mtrezza opened this issue Jan 2, 2022 · 1 comment
Open
3 tasks done

Supply APNS p8 token as string #203

mtrezza opened this issue Jan 2, 2022 · 1 comment

Comments

@mtrezza
Copy link
Member

mtrezza commented Jan 2, 2022

New Feature / Enhancement Checklist

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

@parse-github-assistant
Copy link

Thanks for opening this issue!

  • 🎉 We are excited about your ideas for improvement!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant