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

Security key exposed #87

Closed
Xesenix opened this issue Nov 9, 2019 · 1 comment
Closed

Security key exposed #87

Xesenix opened this issue Nov 9, 2019 · 1 comment

Comments

@Xesenix
Copy link

Xesenix commented Nov 9, 2019

As comment in this line say it should not be exposed
https://github.com/PlayFab/JavaScriptSDK/blob/master/PlayFabSdk/src/PlayFab/PlayFabClientApi.js#L8
but if I understand correctly use of this file it is used in browser on client side so this settings will be exposed.
Why is this value used on client side in this line?
https://github.com/PlayFab/JavaScriptSDK/blob/master/PlayFabSdk/src/PlayFab/PlayFabClientApi.js#L216

@pgilmorepf
Copy link
Contributor

Hello.
There's multiple ways you could use the JS SDK.

Option 1: Make a browser game. In this situation, you would never put the devSecretKey into your game. Those comments are there to inform you of the risk, and ensure you maintain the safety of your title.
Option 2: Internal tools/dashboard for a title. In this situation, your website must be internally secured, such that only you can access it. But, if it's properly internally secured, you can generate and use a devSecretKey for that purpose, and create a web page that monitors and/or maintains some server-side aspect of your game, from a browser. In that case, the suggestion of the code-comment is heeded, and your devSecretKey is both assigned, but also not in customer hands.

For our part, the SDK code is the same for both situations. We both agree that it's important that you're using it correctly. Since you've read the comment and understand the potential problem, I must conclude the comment has worked as intended.

Thank you for your suggestion, and happy coding.

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

No branches or pull requests

2 participants