Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Proposal: Illustrate the API through an examples/ folder #711

Closed
wants to merge 1 commit into from

Conversation

renoirb
Copy link
Contributor

@renoirb renoirb commented May 12, 2014

Nothing fancy, just an illustration on how authentication and account creation works in a bare-bone script.

It proven helpful to understand the in and out of the process.

Tell me if you like and I might give a shot and add other methods later down the road.

@renoirb
Copy link
Contributor Author

renoirb commented May 14, 2014

I just rebased from master. Should be fine now.

@pdehaan
Copy link
Contributor

pdehaan commented May 14, 2014

@dannycoates r?

@pdehaan pdehaan added the r? label May 16, 2014
@renoirb
Copy link
Contributor Author

renoirb commented May 20, 2014

Fixed commit for emailStatus, it was incomplete.

@pdehaan pdehaan added this to the train-14 (Jun 2) milestone May 20, 2014
@renoirb
Copy link
Contributor Author

renoirb commented May 22, 2014

Rebased again with latest master.

This commit contains command-line tests to test:

* `signup.js`:              Sign up with preVerified address (for development/maintenance)
* `login.js`:               Test if login works
* `requestVerifyEmail.js`:  Ask to re-send verification email
* `emailStatus.js`:         Check whether the user has a verified email address
@dannycoates dannycoates modified the milestones: train-15 (Jun 16), train-14 (Jun 2) Jun 3, 2014
@dannycoates dannycoates modified the milestones: train-16 (Jun 30), train-15 (Jun 16) Jun 17, 2014
@ckarlof ckarlof modified the milestones: train-17 (Jul 14), train-16 (Jun 30) Jul 1, 2014
@dannycoates
Copy link
Contributor

I appreciate you taking the time to improve the documentation. These examples do nicely demonstrate the interaction with the server, however, I think it would be better to add them to https://github.com/mozilla/fxa-js-client

The test client included in this repo is only meant to be used by the test framework and I don't want to encourage anyone to depend on it's api or confuse anyone as to which client to use.

A bit of history... The client code here was the first implementation. When fxa-content-server was created it was copied over and periodically synced as the api changed. That worked for a bit but we knew this was not how we wanted to continue so we created fxa-js-client. The intent was to replace this internal client with that one, but as the api stabilized and test cases grew it became less of a priority. We still may do it eventually though.

So the preferred public client is fxa-js-client and we should definitely have some examples there. I think it could be useful to mention the remote tests like https://github.com/mozilla/fxa-auth-server/blob/master/test/remote/flow_tests.js as a quick reference point in the readme.

@renoirb
Copy link
Contributor Author

renoirb commented Jul 1, 2014

Thanks @dannycoates for this explaination.

You can drop the pull request, its all fine with me.

I needed to make a migration script and i used that client code. But now that the first migration has been run on our users, I will only need it once again before the final switch in a week or two. I’ll come soon on the #fxa channel to talk a bit about rebasing your code under my forks.

@dannycoates dannycoates closed this Jul 1, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants