Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

url encode device identity #71

Closed
deadlyfingers opened this issue Nov 12, 2015 · 4 comments
Closed

url encode device identity #71

deadlyfingers opened this issue Nov 12, 2015 · 4 comments
Assignees

Comments

@deadlyfingers
Copy link
Contributor

Ideally this would be a nicer fix on the plugin side...
But until then we could URL encode the device identity on the client so it can be used with REST calls?
One option is using Base64 - https://github.com/RGBboy/urlsafe-base64/blob/master/lib/urlsafe-base64.js

@deadlyfingers
Copy link
Contributor Author

Created a Browserify standalone of the 'urlsafe-base64' npm module for use in client side - can we generate this as part of build script rather than save it as a hard file?

browserify node_modules/urlsafe-base64/lib/urlsafe-base64.js --standalone URLSafeBase64 -o public/scripts/browserify/urlsafe-base64.js

@yaronyg
Copy link
Member

yaronyg commented Nov 16, 2015

Needs to get the user name hooked in. For some reason it's not picking up.

@deadlyfingers
Copy link
Contributor Author

'urlsafe-base64' node module was using a dash character which caused the issues as I use the dash as a delimiter in the postcard app. Going to use a simple string custom regex instead as Matt suggested.

@deadlyfingers
Copy link
Contributor Author

Cards now sync if Device Identity contains '/' char.
Also Contacts now save.

deadlyfingers added a commit that referenced this issue Nov 17, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants