How Do I Implement OAuth 2.0 Integration with Github using a SPA?

What are the best ways to implement OAuth 2.0 with Github using a SPA?

The problem I see is that Github OAuth 2.0 requires using a secret and secrets can’t be stored in SPA’s securely. So what are the best ways to handle this?