write oauth exchange endpoints